|
|
|
@ -456,6 +456,18 @@ static uint8_t target_extruder;
|
|
|
|
|
#define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE()
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
|
|
|
|
#define ADJUST_DELTA(V) \
|
|
|
|
|
if (planner.abl_enabled) { \
|
|
|
|
|
const float zadj = bilinear_z_offset(V); \
|
|
|
|
|
delta[A_AXIS] += zadj; \
|
|
|
|
|
delta[B_AXIS] += zadj; \
|
|
|
|
|
delta[C_AXIS] += zadj; \
|
|
|
|
|
}
|
|
|
|
|
#elif IS_KINEMATIC
|
|
|
|
|
#define ADJUST_DELTA(V) NOOP
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
|
|
|
|
float z_endstop_adj = 0;
|
|
|
|
|
#endif
|
|
|
|
@ -8758,7 +8770,10 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|
|
|
|
#define DELTA_NEXT(ADDEND) LOOP_XYZ(i) DELTA_VAR[i] += ADDEND;
|
|
|
|
|
|
|
|
|
|
// Get the starting delta if interpolation is possible
|
|
|
|
|
if (segments >= 2) DELTA_IK();
|
|
|
|
|
if (segments >= 2) {
|
|
|
|
|
DELTA_IK();
|
|
|
|
|
ADJUST_DELTA(DELTA_VAR); // Adjust Z if bed leveling is enabled
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Loop using decrement
|
|
|
|
|
for (uint16_t s = segments + 1; --s;) {
|
|
|
|
@ -8775,6 +8790,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|
|
|
|
|
|
|
|
|
// Get the exact delta for the move after this
|
|
|
|
|
DELTA_IK();
|
|
|
|
|
ADJUST_DELTA(DELTA_VAR); // Adjust Z if bed leveling is enabled
|
|
|
|
|
|
|
|
|
|
// Move to the interpolated delta position first
|
|
|
|
|
planner.buffer_line(
|
|
|
|
@ -8795,6 +8811,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|
|
|
|
DELTA_NEXT(segment_distance[i]);
|
|
|
|
|
DELTA_VAR[E_AXIS] += segment_distance[E_AXIS];
|
|
|
|
|
DELTA_IK();
|
|
|
|
|
ADJUST_DELTA(DELTA_VAR); // Adjust Z if bed leveling is enabled
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Move to the non-interpolated position
|
|
|
|
@ -8808,7 +8825,9 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
|
|
|
|
// For non-interpolated delta calculate every segment
|
|
|
|
|
for (uint16_t s = segments + 1; --s;) {
|
|
|
|
|
DELTA_NEXT(segment_distance[i]);
|
|
|
|
|
planner.buffer_line_kinematic(DELTA_VAR, _feedrate_mm_s, active_extruder);
|
|
|
|
|
DELTA_IK();
|
|
|
|
|
ADJUST_DELTA(DELTA_VAR);
|
|
|
|
|
planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], DELTA_VAR[E_AXIS], _feedrate_mm_s, active_extruder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|