From 65e4ef99aeae63348ce19dd4027bdabb7e507681 Mon Sep 17 00:00:00 2001 From: gralco Date: Wed, 13 Apr 2016 15:34:30 -0600 Subject: [PATCH] Report that the RX buffer is full inside manage_inactivity --- Marlin/Marlin_main.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index f202cae5af70..c0363a1a384a 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -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) @@ -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));