From c4dbedd5b690175af2a2ec075b8f2c0f644deaa2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 9 Feb 2018 01:42:34 -0600 Subject: [PATCH] Prevent watchdog reset due to many comments Addressing #7449 --- Marlin/Marlin_main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7dc33e77f5..6a2af49684 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1051,7 +1051,8 @@ inline void get_serial_commands() { serial_comment_mode = false; // end of line == end of comment - if (!serial_count) continue; // Skip empty lines + // Skip empty lines and comments + if (!serial_count) { thermalManager.manage_heater(); continue; } serial_line_buffer[serial_count] = 0; // Terminate string serial_count = 0; // Reset buffer @@ -1211,7 +1212,8 @@ inline void get_serial_commands() { sd_comment_mode = false; // for new command - if (!sd_count) continue; // skip empty lines (and comment lines) + // Skip empty lines and comments + if (!sd_count) { thermalManager.manage_heater(); continue; } command_queue[cmd_queue_index_w][sd_count] = '\0'; // terminate string sd_count = 0; // clear sd line buffer