From 0f2c4fc40ba87ffb5e345d7e8a16b5714b9a65bd Mon Sep 17 00:00:00 2001 From: somehibs Date: Wed, 27 Oct 2021 21:00:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20serial=20PORT=5FRESTORE=20?= =?UTF-8?q?(and=20BUFFER=5FMONITORING)=20(#23022)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/serial.h | 2 +- Marlin/src/gcode/queue.cpp | 2 +- Marlin/src/libs/autoreport.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index e058f1e5cd..aee4d4d43d 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -87,7 +87,7 @@ extern uint8_t marlin_debug_flags; // interface with the ability to output to multiple serial ports. #if HAS_MULTI_SERIAL #define _PORT_REDIRECT(n,p) REMEMBER(n,multiSerial.portMask,p) - #define _PORT_RESTORE(n,p) RESTORE(n) + #define _PORT_RESTORE(n) RESTORE(n) #define SERIAL_ASSERT(P) if (multiSerial.portMask!=(P)) { debugger(); } // If we have a catchall, use that directly #ifdef SERIAL_CATCHALL diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index b36205d622..cc52a3bb9e 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -719,7 +719,7 @@ void GCodeQueue::advance() { if (auto_buffer_report_interval && ELAPSED(ms, next_buffer_report_ms)) { next_buffer_report_ms = ms + 1000UL * auto_buffer_report_interval; - PORT_REDIRECT(SERIAL_BOTH); + PORT_REDIRECT(SerialMask::All); report_buffer_statistics(); PORT_RESTORE(); } diff --git a/Marlin/src/libs/autoreport.h b/Marlin/src/libs/autoreport.h index a6bc5adbf7..9aa74ab81e 100644 --- a/Marlin/src/libs/autoreport.h +++ b/Marlin/src/libs/autoreport.h @@ -44,7 +44,7 @@ struct AutoReporter { next_report_ms = ms + SEC_TO_MS(report_interval); PORT_REDIRECT(report_port_mask); Helper::report(); - //PORT_RESTORE(); + PORT_RESTORE(); } } };