Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix line parsing #16840

Merged
merged 2 commits into from
Feb 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Marlin/src/gcode/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
sis = PS_NORMAL;
if (!ind) { thermalManager.manage_heater(); return true; }
buff[ind] = 0;
if (!ind) { thermalManager.manage_heater(); return true; }
ind = 0;
return false;
}
Expand All @@ -377,7 +377,7 @@ inline bool process_line_done(uint8_t &sis, char (&buff)[MAX_CMD_SIZE], int &ind
void GCodeQueue::get_serial_commands() {
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 (card.flag.binary_mode) {
Expand Down