From 9e3fbcf35cd347c3dcbdc0a0b7755f52bb401917 Mon Sep 17 00:00:00 2001 From: revilor Date: Wed, 6 Dec 2017 02:40:36 +0100 Subject: [PATCH] fix for #8669 (#8679) * fix for #8669 * Update G28.cpp --- Marlin/src/gcode/calibrate/G28.cpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index c33d08b14..d641a08d2 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -205,24 +205,22 @@ void GcodeSuite::G28(const bool always_home_all) { #endif } - #else - - if (home_all || homeX || homeY) { - // Raise Z before homing any other axes and z is not already high enough (never lower z) - destination[Z_AXIS] = Z_HOMING_HEIGHT; - if (destination[Z_AXIS] > current_position[Z_AXIS]) { - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) - SERIAL_ECHOLNPAIR("Raise Z (before homing) to ", destination[Z_AXIS]); - #endif - - do_blocking_move_to_z(destination[Z_AXIS]); - } - } - #endif + if (home_all || homeX || homeY) { + // Raise Z before homing any other axes and z is not already high enough (never lower z) + destination[Z_AXIS] = Z_HOMING_HEIGHT; + if (destination[Z_AXIS] > current_position[Z_AXIS]) { + + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) + SERIAL_ECHOLNPAIR("Raise Z (before homing) to ", destination[Z_AXIS]); + #endif + + do_blocking_move_to_z(destination[Z_AXIS]); + } + } + #if ENABLED(QUICK_HOME) if (home_all || (homeX && homeY)) quick_home_xy();