From a647b05f822278743c4f8cdc715e765372580589 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Jun 2016 03:13:34 -0700 Subject: [PATCH] Shrink some debug code in G28 --- Marlin/Marlin_main.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1070c3cdf5..84ba947866 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3518,22 +3518,16 @@ inline void gcode_G28() { float measured_z, z_before = probePointCounter ? Z_RAISE_BETWEEN_PROBINGS + current_position[Z_AXIS] : Z_RAISE_BEFORE_PROBING + home_offset[Z_AXIS]; - if (probePointCounter) { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("z_before = (between) ", (Z_RAISE_BETWEEN_PROBINGS + current_position[Z_AXIS])); - SERIAL_EOL; - } - #endif - } - else { - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - SERIAL_ECHOPAIR("z_before = (before) ", Z_RAISE_BEFORE_PROBING + home_offset[Z_AXIS]); - SERIAL_EOL; - } - #endif - } + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) { + SERIAL_ECHOPGM("z_before = ("); + if (probePointCounter) + SERIAL_ECHOPGM("between) "); + else + SERIAL_ECHOPGM("before) "); + SERIAL_ECHOLN(z_before); + } + #endif #if ENABLED(DELTA) // Avoid probing the corners (outside the round or hexagon print surface) on a delta printer.