From 4e9d658141a40f2b88e26207638a10f1ed8ec3b9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Jul 2015 22:51:11 -0700 Subject: [PATCH] Prevent a hanging SERIAL_ECHO_START in M111 --- Marlin/Marlin_main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 51dd1d8ae..0732a1cfa 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3636,16 +3636,18 @@ inline void gcode_M109() { inline void gcode_M111() { marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_INFO|DEBUG_COMMUNICATION; - SERIAL_ECHO_START; - if (marlin_debug_flags & DEBUG_ECHO) SERIAL_ECHOLNPGM(MSG_DEBUG_ECHO); + if (marlin_debug_flags & DEBUG_ECHO) { + SERIAL_ECHO_START; + SERIAL_ECHOLNPGM(MSG_DEBUG_ECHO); + } // FOR MOMENT NOT ACTIVE //if (marlin_debug_flags & DEBUG_INFO) SERIAL_ECHOLNPGM(MSG_DEBUG_INFO); //if (marlin_debug_flags & DEBUG_ERRORS) SERIAL_ECHOLNPGM(MSG_DEBUG_ERRORS); if (marlin_debug_flags & DEBUG_DRYRUN) { + SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_DEBUG_DRYRUN); disable_all_heaters(); } - SERIAL_EOL; } /**