Skip to content

Commit

Permalink
Report auto temp to both serial ports, if available (MarlinFirmware#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
p3p authored and thinkyhead committed Mar 4, 2019
1 parent 367d392 commit 38bef9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/core/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__); \
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 38bef9d

Please sign in to comment.