From a3e91ec65e5616022c81ce039f0648cde5c2111b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 26 Sep 2016 23:39:20 -0500 Subject: [PATCH] Add 'Q' option to G29 when debug leveling is on --- Marlin/Marlin_main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 5ad1bb169..e717aa25f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3475,11 +3475,15 @@ inline void gcode_G28() { inline void gcode_G29() { #if ENABLED(DEBUG_LEVELING_FEATURE) + bool query = code_seen('Q'); + uint8_t old_debug_flags = marlin_debug_flags; + if (query) marlin_debug_flags |= DEBUG_LEVELING; if (DEBUGGING(LEVELING)) { - SERIAL_ECHOLNPGM(">>> gcode_G29"); - DEBUG_POS("", current_position); + DEBUG_POS(">>> gcode_G29", current_position); log_machine_info(); } + marlin_debug_flags = old_debug_flags; + if (query) return; #endif // Don't allow auto-leveling without homing first