Skip to content

Commit

Permalink
Change the commands_in_queue to 1 after a failed probe and after clea…
Browse files Browse the repository at this point in the history
…ring the command_queue buffer
  • Loading branch information
scalez committed Apr 13, 2016
1 parent 8e628e2 commit 93b6bff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ void clear_buffer() {
command_queue[i][j] = NULL;
MYSERIAL.flush();
serial_count = 0;
commands_in_queue = 0;
commands_in_queue = 1;
cmd_queue_index_r = BUFSIZE-1;
cmd_queue_index_w = 0;
}
Expand Down Expand Up @@ -1002,13 +1002,13 @@ inline void get_serial_commands() {
for(uint8_t j=0; j < MAX_CMD_SIZE; j++)
command_queue[cmd_queue_index_r][j] = 0;
if(commands_in_queue) {
commands_in_queue = 0;
commands_in_queue = 1;
cmd_queue_index_r = (cmd_queue_index_r + 1) % BUFSIZE;
}
serial_count = 0;
return;
}
#endif
#endif

#if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
last_command_time = ms;
Expand Down

0 comments on commit 93b6bff

Please sign in to comment.