|
|
|
@ -308,22 +308,22 @@ class Planner {
|
|
|
|
|
* The target is cartesian, it's translated to delta/scara if
|
|
|
|
|
* needed.
|
|
|
|
|
*
|
|
|
|
|
* target - x,y,z,e CARTESIAN target in mm
|
|
|
|
|
* ltarget - x,y,z,e CARTESIAN target in mm
|
|
|
|
|
* fr_mm_s - (target) speed of the move (mm/s)
|
|
|
|
|
* extruder - target extruder
|
|
|
|
|
*/
|
|
|
|
|
static FORCE_INLINE void buffer_line_kinematic(const float target[XYZE], const float &fr_mm_s, const uint8_t extruder) {
|
|
|
|
|
static FORCE_INLINE void buffer_line_kinematic(const float ltarget[XYZE], const float &fr_mm_s, const uint8_t extruder) {
|
|
|
|
|
#if PLANNER_LEVELING
|
|
|
|
|
float pos[XYZ] = { target[X_AXIS], target[Y_AXIS], target[Z_AXIS] };
|
|
|
|
|
apply_leveling(pos);
|
|
|
|
|
float lpos[XYZ] = { ltarget[X_AXIS], ltarget[Y_AXIS], ltarget[Z_AXIS] };
|
|
|
|
|
apply_leveling(lpos);
|
|
|
|
|
#else
|
|
|
|
|
const float * const pos = target;
|
|
|
|
|
const float * const lpos = ltarget;
|
|
|
|
|
#endif
|
|
|
|
|
#if IS_KINEMATIC
|
|
|
|
|
inverse_kinematics(pos);
|
|
|
|
|
_buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], target[E_AXIS], fr_mm_s, extruder);
|
|
|
|
|
inverse_kinematics(lpos);
|
|
|
|
|
_buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], ltarget[E_AXIS], fr_mm_s, extruder);
|
|
|
|
|
#else
|
|
|
|
|
_buffer_line(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], target[E_AXIS], fr_mm_s, extruder);
|
|
|
|
|
_buffer_line(lpos[X_AXIS], lpos[Y_AXIS], lpos[Z_AXIS], ltarget[E_AXIS], fr_mm_s, extruder);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|