Browse Source

🐛 Fix serial PORT_RESTORE (and BUFFER_MONITORING) (#23022)

vanilla_fb_2.0.x
somehibs 3 years ago
committed by Scott Lahteine
parent
commit
0f2c4fc40b
  1. 2
      Marlin/src/core/serial.h
  2. 2
      Marlin/src/gcode/queue.cpp
  3. 2
      Marlin/src/libs/autoreport.h

2
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. // interface with the ability to output to multiple serial ports.
#if HAS_MULTI_SERIAL #if HAS_MULTI_SERIAL
#define _PORT_REDIRECT(n,p) REMEMBER(n,multiSerial.portMask,p) #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(); } #define SERIAL_ASSERT(P) if (multiSerial.portMask!=(P)) { debugger(); }
// If we have a catchall, use that directly // If we have a catchall, use that directly
#ifdef SERIAL_CATCHALL #ifdef SERIAL_CATCHALL

2
Marlin/src/gcode/queue.cpp

@ -719,7 +719,7 @@ void GCodeQueue::advance() {
if (auto_buffer_report_interval && ELAPSED(ms, next_buffer_report_ms)) { if (auto_buffer_report_interval && ELAPSED(ms, next_buffer_report_ms)) {
next_buffer_report_ms = ms + 1000UL * auto_buffer_report_interval; next_buffer_report_ms = ms + 1000UL * auto_buffer_report_interval;
PORT_REDIRECT(SERIAL_BOTH); PORT_REDIRECT(SerialMask::All);
report_buffer_statistics(); report_buffer_statistics();
PORT_RESTORE(); PORT_RESTORE();
} }

2
Marlin/src/libs/autoreport.h

@ -44,7 +44,7 @@ struct AutoReporter {
next_report_ms = ms + SEC_TO_MS(report_interval); next_report_ms = ms + SEC_TO_MS(report_interval);
PORT_REDIRECT(report_port_mask); PORT_REDIRECT(report_port_mask);
Helper::report(); Helper::report();
//PORT_RESTORE(); PORT_RESTORE();
} }
} }
}; };

Loading…
Cancel
Save