From c30a8067ab7b108ff8c55ad3fb21be0618877363 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 9 Feb 2018 01:50:14 -0600 Subject: [PATCH] Prevent watchdog reset due to many comments Addressing #7449 --- Marlin/src/gcode/queue.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index ce619814a7..7aecaf3c04 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -30,6 +30,7 @@ #include "../lcd/ultralcd.h" #include "../sd/cardreader.h" #include "../module/planner.h" +#include "../module/temperature.h" #include "../Marlin.h" #if HAS_COLOR_LEDS @@ -297,7 +298,8 @@ inline void get_serial_commands() { serial_comment_mode[i] = false; // end of line == end of comment - if (!serial_count[i]) continue; // Skip empty lines + // Skip empty lines and comments + if (!serial_count[i]) { thermalManager.manage_heater(); continue; } serial_line_buffer[i][serial_count[i]] = 0; // Terminate string serial_count[i] = 0; // Reset buffer @@ -458,7 +460,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