Skip to content

Commit

Permalink
Report that the RX buffer is full inside manage_inactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
scalez committed Apr 13, 2016
1 parent 93b6bff commit 65e4ef9
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7678,17 +7678,6 @@ void plan_arc(
SERIAL_EOL;
*/
}

static bool reportrx_once = true;
if(rxbuf_filled && reportrx_once)
{
SERIAL_ERROR_START;
SERIAL_ERRORPGM(MSG_ERR_RXBUF_FULL);
reportrx_once = false;
}
else if(!rxbuf_filled)
reportrx_once = true;

#endif // SCARA

#if ENABLED(TEMP_STAT_LEDS)
Expand Down Expand Up @@ -7775,6 +7764,16 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {

if (commands_in_queue < BUFSIZE) get_available_commands();

static bool reportrx_once = true;
if(rxbuf_filled && reportrx_once)
{
SERIAL_ERROR_START;
SERIAL_ERRORPGM(MSG_ERR_RXBUF_FULL);
reportrx_once = false;
}
else if(!rxbuf_filled)
reportrx_once = true;

millis_t ms = millis();

if (max_inactive_time && ELAPSED(ms, previous_cmd_ms + max_inactive_time)) kill(PSTR(MSG_KILLED));
Expand Down

0 comments on commit 65e4ef9

Please sign in to comment.