From 4628f0e237d452a7c6633c3d6127a460b3bb477b Mon Sep 17 00:00:00 2001 From: Cole Markham Date: Sat, 19 Sep 2020 08:14:34 -0500 Subject: [PATCH] Fix CoreXY compile with backlash cal. (#19422) --- Marlin/src/gcode/calibrate/M425.cpp | 2 +- Marlin/src/inc/Conditionals_post.h | 5 +---- Marlin/src/lcd/menu/menu_backlash.cpp | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/calibrate/M425.cpp b/Marlin/src/gcode/calibrate/M425.cpp index 3e54186a5..40441ac08 100644 --- a/Marlin/src/gcode/calibrate/M425.cpp +++ b/Marlin/src/gcode/calibrate/M425.cpp @@ -56,7 +56,7 @@ void GcodeSuite::M425() { }; LOOP_XYZ(a) { - if (AXIS_CAN_CALIBRATE(a) && parser.seen(XYZ_CHAR(a))) { + if (axis_can_calibrate(a) && parser.seen(XYZ_CHAR(a))) { planner.synchronize(); backlash.distance_mm[a] = parser.has_value() ? parser.value_linear_units() : backlash.get_measurement(AxisEnum(a)); noArgs = false; diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 71ae4bb28..2b232623a 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -159,10 +159,7 @@ // Calibration codes only for non-core axes #if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE) #if EITHER(IS_CORE, MARKFORGED_XY) - #define X_AXIS_INDEX 0 - #define Y_AXIS_INDEX 1 - #define Z_AXIS_INDEX 2 - #define CAN_CALIBRATE(A,B) (A##_AXIS_INDEX == B##_INDEX) + #define CAN_CALIBRATE(A,B) (_AXIS(A) == B) #else #define CAN_CALIBRATE(A,B) 1 #endif diff --git a/Marlin/src/lcd/menu/menu_backlash.cpp b/Marlin/src/lcd/menu/menu_backlash.cpp index 0e1bfb591..9d0b970ae 100644 --- a/Marlin/src/lcd/menu/menu_backlash.cpp +++ b/Marlin/src/lcd/menu/menu_backlash.cpp @@ -50,4 +50,4 @@ void menu_backlash() { END_MENU(); } -#endif // HAS_LCD_MENU && BACKLASH_COMPENSATION +#endif // HAS_LCD_MENU && BACKLASH_GCODE