Skip to content

Commit

Permalink
🐛 Fix serial_data_available (MarlinFirmware#23160)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbycandra authored and AlexColello committed Jan 14, 2022
1 parent 67be797 commit 016c651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/gcode/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void GCodeQueue::flush_and_request_resend(const serial_index_t serial_ind) {

static bool serial_data_available(serial_index_t index) {
const int a = SERIAL_IMPL.available(index);
#if BOTH(RX_BUFFER_MONITOR, RX_BUFFER_SIZE)
#if ENABLED(RX_BUFFER_MONITOR) && RX_BUFFER_SIZE
if (a > RX_BUFFER_SIZE - 2) {
PORT_REDIRECT(SERIAL_PORTMASK(index));
SERIAL_ERROR_MSG("RX BUF overflow, increase RX_BUFFER_SIZE: ", a);
Expand Down

0 comments on commit 016c651

Please sign in to comment.