Prevent watchdog reset due to many comments

Addressing #7449
This commit is contained in:
Scott Lahteine 2018-02-09 01:42:34 -06:00
parent 9727e5e3d6
commit c4dbedd5b6

View File

@ -1051,7 +1051,8 @@ inline void get_serial_commands() {
serial_comment_mode = false; // end of line == end of comment 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_line_buffer[serial_count] = 0; // Terminate string
serial_count = 0; // Reset buffer serial_count = 0; // Reset buffer
@ -1211,7 +1212,8 @@ inline void get_serial_commands() {
sd_comment_mode = false; // for new command 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 command_queue[cmd_queue_index_w][sd_count] = '\0'; // terminate string
sd_count = 0; // clear sd line buffer sd_count = 0; // clear sd line buffer