|
@@ -30,6 +30,7 @@
|
30
|
30
|
#include "../lcd/ultralcd.h"
|
31
|
31
|
#include "../sd/cardreader.h"
|
32
|
32
|
#include "../module/planner.h"
|
|
33
|
+#include "../module/temperature.h"
|
33
|
34
|
#include "../Marlin.h"
|
34
|
35
|
|
35
|
36
|
#if HAS_COLOR_LEDS
|
|
@@ -271,7 +272,7 @@ inline void get_serial_commands() {
|
271
|
272
|
|
272
|
273
|
// If the command buffer is empty for too long,
|
273
|
274
|
// send "wait" to indicate Marlin is still waiting.
|
274
|
|
- #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
|
|
275
|
+ #if NO_TIMEOUTS > 0
|
275
|
276
|
static millis_t last_command_time = 0;
|
276
|
277
|
const millis_t ms = millis();
|
277
|
278
|
if (commands_in_queue == 0 && !serial_data_available() && ELAPSED(ms, last_command_time + NO_TIMEOUTS)) {
|
|
@@ -297,7 +298,8 @@ inline void get_serial_commands() {
|
297
|
298
|
|
298
|
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
|
304
|
serial_line_buffer[i][serial_count[i]] = 0; // Terminate string
|
303
|
305
|
serial_count[i] = 0; // Reset buffer
|
|
@@ -387,7 +389,7 @@ inline void get_serial_commands() {
|
387
|
389
|
else if (serial_char == '\\') { // Handle escapes
|
388
|
390
|
// if we have one more character, copy it over
|
389
|
391
|
if ((c = read_serial(i)) >= 0 && !serial_comment_mode[i])
|
390
|
|
- serial_line_buffer[i][serial_count[i]++] = serial_char;
|
|
392
|
+ serial_line_buffer[i][serial_count[i]++] = (char)c;
|
391
|
393
|
}
|
392
|
394
|
else { // it's not a newline, carriage return or escape char
|
393
|
395
|
if (serial_char == ';') serial_comment_mode[i] = true;
|
|
@@ -458,7 +460,8 @@ inline void get_serial_commands() {
|
458
|
460
|
|
459
|
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
|
466
|
command_queue[cmd_queue_index_w][sd_count] = '\0'; // terminate string
|
464
|
467
|
sd_count = 0; // clear sd line buffer
|