Skip to content

Commit

Permalink
Prevent watchdog reset due to many comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Feb 9, 2018
1 parent 9727e5e commit c4dbedd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c4dbedd

Please sign in to comment.