From b1f3dfab2886f954d5ba9a8e21390d003b174ccd Mon Sep 17 00:00:00 2001 From: revilor Date: Wed, 6 Dec 2017 02:40:57 +0100 Subject: [PATCH] Fix for #8669 (#8677) --- Marlin/Marlin_main.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index d23b3ec98..f73a12a87 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -4004,23 +4004,21 @@ inline void gcode_G28(const bool always_home_all) { #endif } - #else + #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 (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 + #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]); - } + do_blocking_move_to_z(destination[Z_AXIS]); } - - #endif + } #if ENABLED(QUICK_HOME)