From a09d7a59b4d70f3171202bacff48db48553e39ff Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 16 Feb 2021 21:13:53 -0600 Subject: [PATCH] Fix IDEX broken endstop test (#21110) --- Marlin/src/gcode/calibrate/G28.cpp | 2 +- Marlin/src/module/endstops.h | 2 +- Marlin/src/module/motion.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 2de029a08..12f85f705 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -96,7 +96,7 @@ }; #endif - do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s); + do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * Y_HOME_DIR, fr_mm_s); endstops.validate_homing_move(); diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index 05936a6bf..c0cc9cdb8 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -38,7 +38,7 @@ enum EndstopEnum : char { Z4_MIN, Z4_MAX }; -#define X_ENDSTOP (X_HOME_DIR < 0 ? X_MIN : X_MAX) +#define X_ENDSTOP (x_home_dir(active_extruder) < 0 ? X_MIN : X_MAX) #define Y_ENDSTOP (Y_HOME_DIR < 0 ? Y_MIN : Y_MAX) #define Z_ENDSTOP (Z_HOME_DIR < 0 ? TERN(HOMING_Z_WITH_PROBE, Z_MIN, Z_MIN_PROBE) : Z_MAX) diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index 887da1aa1..328bfe018 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -450,7 +450,7 @@ FORCE_INLINE void set_all_unhomed() { axis_homed = axis_tr FORCE_INLINE void set_duplication_enabled(const bool dupe) { extruder_duplication_enabled = dupe; } #endif - FORCE_INLINE int x_home_dir(const uint8_t) { return home_dir(X_AXIS); } + FORCE_INLINE int x_home_dir(const uint8_t) { return X_HOME_DIR; } #endif