From 38bef9da9196ed261bbee7848ed84b7d3bd071fa Mon Sep 17 00:00:00 2001 From: Chris Pepper Date: Mon, 4 Mar 2019 03:03:48 +0000 Subject: [PATCH] Report auto temp to both serial ports, if available (#13301) --- Marlin/src/core/serial.h | 2 +- Marlin/src/module/temperature.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index b2d0f73b3..edc0cb2b6 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -42,11 +42,11 @@ enum MarlinDebugFlags : uint8_t { extern uint8_t marlin_debug_flags; #define DEBUGGING(F) (marlin_debug_flags & (MARLIN_DEBUG_## F)) +#define SERIAL_BOTH 0x7F #if NUM_SERIAL > 1 extern int8_t serial_port_index; #define _PORT_REDIRECT(n,p) REMEMBER(n,serial_port_index,p) #define _PORT_RESTORE(n) RESTORE(n) - #define SERIAL_BOTH 0x7F #define SERIAL_OUT(WHAT, ...) do{ \ if (!serial_port_index || serial_port_index == SERIAL_BOTH) MYSERIAL0.WHAT(__VA_ARGS__); \ if ( serial_port_index) MYSERIAL1.WHAT(__VA_ARGS__); \ diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 109a3c531..c425fadce 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2660,6 +2660,7 @@ void Temperature::isr() { void Temperature::auto_report_temperatures() { if (auto_report_temp_interval && ELAPSED(millis(), next_temp_report_ms)) { next_temp_report_ms = millis() + 1000UL * auto_report_temp_interval; + PORT_REDIRECT(SERIAL_BOTH); print_heater_states(active_extruder); SERIAL_EOL(); }