From b64cc9329e821f5ab5b00b112636aa8c2c7b7637 Mon Sep 17 00:00:00 2001 From: Giuliano <3684609+GMagician@users.noreply.github.com> Date: Sun, 10 Jun 2018 09:08:47 +0200 Subject: [PATCH] [2.0.x] Fix dual enstop home (#10980) --- Marlin/src/module/motion.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 846d99b2dd..4587704983 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1335,7 +1335,7 @@ void homeaxis(const AxisEnum axis) { if (axis == X_AXIS) { 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); - do_homing_move(axis, pos_dir ? adj : -adj); + do_homing_move(axis, pos_dir ? -adj : adj); stepper.set_x_lock(false); stepper.set_x2_lock(false); } @@ -1344,7 +1344,7 @@ void homeaxis(const AxisEnum axis) { if (axis == Y_AXIS) { 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); - do_homing_move(axis, pos_dir ? adj : -adj); + do_homing_move(axis, pos_dir ? -adj : adj); stepper.set_y_lock(false); stepper.set_y2_lock(false); } @@ -1353,7 +1353,7 @@ void homeaxis(const AxisEnum axis) { if (axis == Z_AXIS) { 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); - do_homing_move(axis, pos_dir ? adj : -adj); + do_homing_move(axis, pos_dir ? -adj : adj); stepper.set_z_lock(false); stepper.set_z2_lock(false); }