From 15190d40df3dcc74229b37040152072ae986efd7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Jul 2015 22:04:29 -0700 Subject: [PATCH 1/5] Add extra EOL after M111 --- Marlin/Marlin_main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index eb33589d94..38b1ac39ab 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3648,6 +3648,7 @@ inline void gcode_M111() { setTargetHotend(0, cur_hotend); } } + SERIAL_EOL; } /** From 6b494c1535a41b09b345281a1f80cd734ecddd88 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Jul 2015 22:04:43 -0700 Subject: [PATCH 2/5] Use disable_all_heaters in M111 --- Marlin/Marlin_main.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 38b1ac39ab..51dd1d8ae2 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3643,10 +3643,7 @@ inline void gcode_M111() { //if (marlin_debug_flags & DEBUG_ERRORS) SERIAL_ECHOLNPGM(MSG_DEBUG_ERRORS); if (marlin_debug_flags & DEBUG_DRYRUN) { SERIAL_ECHOLNPGM(MSG_DEBUG_DRYRUN); - setTargetBed(0); - for (int8_t cur_hotend = 0; cur_hotend < EXTRUDERS; ++cur_hotend) { - setTargetHotend(0, cur_hotend); - } + disable_all_heaters(); } SERIAL_EOL; } From d78ebbc0e95a5af05d3d177dd6a74f100dae366c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Jul 2015 22:05:04 -0700 Subject: [PATCH 3/5] Remove unused MSG_OK_B and MSG_OK_T --- Marlin/configurator/config/language.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Marlin/configurator/config/language.h b/Marlin/configurator/config/language.h index f83a0d9a1e..2c3f9d240d 100644 --- a/Marlin/configurator/config/language.h +++ b/Marlin/configurator/config/language.h @@ -195,8 +195,6 @@ #define MSG_KP " Kp: " #define MSG_KI " Ki: " #define MSG_KD " Kd: " -#define MSG_OK_B "ok B:" -#define MSG_OK_T "ok T:" #define MSG_AT " @:" #define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h" #define MSG_PID_DEBUG " PID_DEBUG " From bc0fdbe88e00403e85c637cb404b2552284cab88 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Jul 2015 22:06:07 -0700 Subject: [PATCH 4/5] Use SERIAL_EOL in SERIAL_PROTOCOLLN macros --- Marlin/Marlin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index f4e353a5d7..58c0618bc8 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -75,8 +75,8 @@ typedef unsigned long millis_t; #define SERIAL_PROTOCOL(x) MYSERIAL.print(x) #define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y) #define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x)) -#define SERIAL_PROTOCOLLN(x) do{ MYSERIAL.print(x),MYSERIAL.write('\n'); }while(0) -#define SERIAL_PROTOCOLLNPGM(x) do{ serialprintPGM(PSTR(x)),MYSERIAL.write('\n'); }while(0) +#define SERIAL_PROTOCOLLN(x) do{ MYSERIAL.print(x); SERIAL_EOL; }while(0) +#define SERIAL_PROTOCOLLNPGM(x) do{ serialprintPGM(PSTR(x)); SERIAL_EOL; }while(0) extern const char errormagic[] PROGMEM; From 4e9d658141a40f2b88e26207638a10f1ed8ec3b9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Jul 2015 22:51:11 -0700 Subject: [PATCH 5/5] 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 51dd1d8ae2..0732a1cfa6 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; } /**