[2.0.x] fix kill printer (#11260)
This will fix kill message on dual printer with 0 alignment offset
This commit is contained in:
parent
8c57cadbe7
commit
e5ea9d200f
@ -1369,28 +1369,34 @@ void homeaxis(const AxisEnum axis) {
|
|||||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||||
if (axis == X_AXIS) {
|
if (axis == X_AXIS) {
|
||||||
const float adj = ABS(endstops.x_endstop_adj);
|
const float adj = ABS(endstops.x_endstop_adj);
|
||||||
if (pos_dir ? (endstops.x_endstop_adj > 0) : (endstops.x_endstop_adj < 0)) stepper.set_x_lock(true); else stepper.set_x2_lock(true);
|
if (adj) {
|
||||||
do_homing_move(axis, pos_dir ? -adj : adj);
|
if (pos_dir ? (endstops.x_endstop_adj > 0) : (endstops.x_endstop_adj < 0)) stepper.set_x_lock(true); else stepper.set_x2_lock(true);
|
||||||
stepper.set_x_lock(false);
|
do_homing_move(axis, pos_dir ? -adj : adj);
|
||||||
stepper.set_x2_lock(false);
|
stepper.set_x_lock(false);
|
||||||
|
stepper.set_x2_lock(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||||
if (axis == Y_AXIS) {
|
if (axis == Y_AXIS) {
|
||||||
const float adj = ABS(endstops.y_endstop_adj);
|
const float adj = ABS(endstops.y_endstop_adj);
|
||||||
if (pos_dir ? (endstops.y_endstop_adj > 0) : (endstops.y_endstop_adj < 0)) stepper.set_y_lock(true); else stepper.set_y2_lock(true);
|
if (adj) {
|
||||||
do_homing_move(axis, pos_dir ? -adj : adj);
|
if (pos_dir ? (endstops.y_endstop_adj > 0) : (endstops.y_endstop_adj < 0)) stepper.set_y_lock(true); else stepper.set_y2_lock(true);
|
||||||
stepper.set_y_lock(false);
|
do_homing_move(axis, pos_dir ? -adj : adj);
|
||||||
stepper.set_y2_lock(false);
|
stepper.set_y_lock(false);
|
||||||
|
stepper.set_y2_lock(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||||
if (axis == Z_AXIS) {
|
if (axis == Z_AXIS) {
|
||||||
const float adj = ABS(endstops.z_endstop_adj);
|
const float adj = ABS(endstops.z_endstop_adj);
|
||||||
if (pos_dir ? (endstops.z_endstop_adj > 0) : (endstops.z_endstop_adj < 0)) stepper.set_z_lock(true); else stepper.set_z2_lock(true);
|
if (adj) {
|
||||||
do_homing_move(axis, pos_dir ? -adj : adj);
|
if (pos_dir ? (endstops.z_endstop_adj > 0) : (endstops.z_endstop_adj < 0)) stepper.set_z_lock(true); else stepper.set_z2_lock(true);
|
||||||
stepper.set_z_lock(false);
|
do_homing_move(axis, pos_dir ? -adj : adj);
|
||||||
stepper.set_z2_lock(false);
|
stepper.set_z_lock(false);
|
||||||
|
stepper.set_z2_lock(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
stepper.set_homing_dual_axis(false);
|
stepper.set_homing_dual_axis(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user