瀏覽代碼

Prevent watchdog reset due to many comments

Addressing #7449
Scott Lahteine 7 年之前
父節點
當前提交
c30a8067ab
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5
    2
      Marlin/src/gcode/queue.cpp

+ 5
- 2
Marlin/src/gcode/queue.cpp 查看文件

30
 #include "../lcd/ultralcd.h"
30
 #include "../lcd/ultralcd.h"
31
 #include "../sd/cardreader.h"
31
 #include "../sd/cardreader.h"
32
 #include "../module/planner.h"
32
 #include "../module/planner.h"
33
+#include "../module/temperature.h"
33
 #include "../Marlin.h"
34
 #include "../Marlin.h"
34
 
35
 
35
 #if HAS_COLOR_LEDS
36
 #if HAS_COLOR_LEDS
297
 
298
 
298
         serial_comment_mode[i] = false;                   // end of line == end of comment
299
         serial_comment_mode[i] = false;                   // end of line == end of comment
299
 
300
 
300
-        if (!serial_count[i]) continue;                   // Skip empty lines
301
+        // Skip empty lines and comments
302
+        if (!serial_count[i]) { thermalManager.manage_heater(); continue; }
301
 
303
 
302
         serial_line_buffer[i][serial_count[i]] = 0;       // Terminate string
304
         serial_line_buffer[i][serial_count[i]] = 0;       // Terminate string
303
         serial_count[i] = 0;                              // Reset buffer
305
         serial_count[i] = 0;                              // Reset buffer
458
 
460
 
459
         sd_comment_mode = false; // for new command
461
         sd_comment_mode = false; // for new command
460
 
462
 
461
-        if (!sd_count) continue; // skip empty lines (and comment lines)
463
+        // Skip empty lines and comments
464
+        if (!sd_count) { thermalManager.manage_heater(); continue; }
462
 
465
 
463
         command_queue[cmd_queue_index_w][sd_count] = '\0'; // terminate string
466
         command_queue[cmd_queue_index_w][sd_count] = '\0'; // terminate string
464
         sd_count = 0; // clear sd line buffer
467
         sd_count = 0; // clear sd line buffer

Loading…
取消
儲存