From 3c179bbd474141d2d03540c9d0887bb3c6080b2a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 May 2019 15:30:20 -0500 Subject: [PATCH] Simpler G28 home axis conditions --- Marlin/src/gcode/calibrate/G28.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index c191eeae3b..3656dc0999 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -260,13 +260,9 @@ void GcodeSuite::G28(const bool always_home_all) { #else // NOT DELTA - const bool homeX = always_home_all || parser.seen('X'), - homeY = always_home_all || parser.seen('Y'), - homeZ = always_home_all || parser.seen('Z'), - home_all = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ), - doX = home_all || homeX, - doY = home_all || homeY, - doZ = home_all || homeZ; + const bool homeX = parser.seen('X'), homeY = parser.seen('Y'), homeZ = parser.seen('Z'), + home_all = always_home_all || (homeX == homeY && homeX == homeZ), + doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ; set_destination_from_current();