Fix CoreXY compile with backlash cal. (#19422)

2.0.x
Cole Markham 4 years ago committed by Scott Lahteine
parent 9d60047018
commit 9065a8da89

@ -56,7 +56,7 @@ void GcodeSuite::M425() {
}; };
LOOP_XYZ(a) { 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(); planner.synchronize();
backlash.distance_mm[a] = parser.has_value() ? parser.value_linear_units() : backlash.get_measurement(AxisEnum(a)); backlash.distance_mm[a] = parser.has_value() ? parser.value_linear_units() : backlash.get_measurement(AxisEnum(a));
noArgs = false; noArgs = false;

@ -159,10 +159,7 @@
// Calibration codes only for non-core axes // Calibration codes only for non-core axes
#if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE) #if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE)
#if EITHER(IS_CORE, MARKFORGED_XY) #if EITHER(IS_CORE, MARKFORGED_XY)
#define X_AXIS_INDEX 0 #define CAN_CALIBRATE(A,B) (_AXIS(A) == B)
#define Y_AXIS_INDEX 1
#define Z_AXIS_INDEX 2
#define CAN_CALIBRATE(A,B) (A##_AXIS_INDEX == B##_INDEX)
#else #else
#define CAN_CALIBRATE(A,B) 1 #define CAN_CALIBRATE(A,B) 1
#endif #endif

@ -50,4 +50,4 @@ void menu_backlash() {
END_MENU(); END_MENU();
} }
#endif // HAS_LCD_MENU && BACKLASH_COMPENSATION #endif // HAS_LCD_MENU && BACKLASH_GCODE

Loading…
Cancel
Save