From bc1ba998b20e68e9f913ddc5d9e89bd8cf11efc9 Mon Sep 17 00:00:00 2001 From: Alexander Amelkin Date: Mon, 10 Sep 2018 06:06:03 +0300 Subject: [PATCH] [2.0.x] Fix undefined symbol 'g29_in_progress' (#11781) --- Marlin/src/gcode/calibrate/G28.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 02fe1bbedb..b8cfe9b78d 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -205,14 +205,15 @@ void GcodeSuite::G28(const bool always_home_all) { // Wait for planner moves to finish! planner.synchronize(); - // Cancel the active G29 session - #if ENABLED(PROBE_MANUALLY) - extern bool g29_in_progress; - g29_in_progress = false; - #endif - // Disable the leveling matrix before homing #if HAS_LEVELING + + // Cancel the active G29 session + #if ENABLED(PROBE_MANUALLY) + extern bool g29_in_progress; + g29_in_progress = false; + #endif + #if ENABLED(RESTORE_LEVELING_AFTER_G28) const bool leveling_was_active = planner.leveling_active; #endif