|
|
|
|
378
|
|| (!is_lcd && c == '\n') // LF on a G-code command
|
378
|
|| (!is_lcd && c == '\n') // LF on a G-code command
|
379
|
) {
|
379
|
) {
|
380
|
inbound_buffer[inbound_count] = '\0'; // Reset before processing
|
380
|
inbound_buffer[inbound_count] = '\0'; // Reset before processing
|
381
|
- parsing = 0; // Unflag and...
|
|
|
382
|
inbound_count = 0; // Reset buffer index
|
381
|
inbound_count = 0; // Reset buffer index
|
383
|
if (parsing == 1)
|
382
|
if (parsing == 1)
|
384
|
process_lcd_command(inbound_buffer); // Handle the LCD command
|
383
|
process_lcd_command(inbound_buffer); // Handle the LCD command
|
385
|
else
|
384
|
else
|
386
|
queue.enqueue_one_now(inbound_buffer); // Handle the G-code command
|
385
|
queue.enqueue_one_now(inbound_buffer); // Handle the G-code command
|
|
|
386
|
+ parsing = 0; // Unflag and...
|
387
|
}
|
387
|
}
|
388
|
else if (inbound_count < MAX_CURLY_COMMAND - 2)
|
388
|
else if (inbound_count < MAX_CURLY_COMMAND - 2)
|
389
|
inbound_buffer[inbound_count++] = is_lcd ? c : b; // Buffer while space remains
|
389
|
inbound_buffer[inbound_count++] = is_lcd ? c : b; // Buffer while space remains
|