Fix G-code line parsing (#16840)
This commit is contained in:
parent
68077149e2
commit
0e17d10bf3
1 changed files with 2 additions and 2 deletions
|
@ -363,8 +363,8 @@ inline void process_stream_char(const char c, uint8_t &sis, char (&buff)[MAX_CMD
|
||||||
|
|
||||||
inline bool process_line_done(uint8_t &sis, char (&buff)[MAX_CMD_SIZE], int &ind) {
|
inline bool process_line_done(uint8_t &sis, char (&buff)[MAX_CMD_SIZE], int &ind) {
|
||||||
sis = PS_NORMAL;
|
sis = PS_NORMAL;
|
||||||
if (!ind) { thermalManager.manage_heater(); return true; }
|
|
||||||
buff[ind] = 0;
|
buff[ind] = 0;
|
||||||
|
if (!ind) { thermalManager.manage_heater(); return true; }
|
||||||
ind = 0;
|
ind = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ inline bool process_line_done(uint8_t &sis, char (&buff)[MAX_CMD_SIZE], int &ind
|
||||||
void GCodeQueue::get_serial_commands() {
|
void GCodeQueue::get_serial_commands() {
|
||||||
static char serial_line_buffer[NUM_SERIAL][MAX_CMD_SIZE];
|
static char serial_line_buffer[NUM_SERIAL][MAX_CMD_SIZE];
|
||||||
|
|
||||||
static uint8_t serial_input_state[NUM_SERIAL] = { 0 };
|
static uint8_t serial_input_state[NUM_SERIAL] = { PS_NORMAL };
|
||||||
|
|
||||||
#if ENABLED(BINARY_FILE_TRANSFER)
|
#if ENABLED(BINARY_FILE_TRANSFER)
|
||||||
if (card.flag.binary_mode) {
|
if (card.flag.binary_mode) {
|
||||||
|
|
Reference in a new issue