1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-28 22:35:21 +00:00

🐛 Fix serial_data_available (#23160)

This commit is contained in:
Robby Candra 2021-11-24 04:19:32 +07:00 committed by GitHub
parent 5387ceba74
commit de398b4fd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);