From f8d577b28c4c3f9d5137e9c8ebf5d4d01c01564b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 4 Oct 2024 18:29:01 -0500 Subject: [PATCH] G28 F special case for X and Y --- Marlin/src/gcode/calibrate/G28.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index edeb410040..292f0c5c01 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -376,7 +376,11 @@ void GcodeSuite::G28() { constexpr bool doY = false; #endif - #define OVERRIDE_AXIS_FR(A) if (override_fr_units_min && seen##A) SET_AXIS_FR(A); + // Override any specified axes, or just XY for "home all" + #define OVERRIDE_AXIS_FR(A) \ + if (override_fr_units_min && (seen##A || \ + (home_all && TERN1(HAS_X_AXIS, _AXIS(A) == X_AXIS) && TERN1(HAS_Y_AXIS, _AXIS(A) == Y_AXIS)) \ + )) SET_AXIS_FR(A); TERN_(HAS_X_AXIS, OVERRIDE_AXIS_FR(X)); TERN_(HAS_Y_AXIS, OVERRIDE_AXIS_FR(Y));