Преглед на файлове

Report auto temp to both serial ports, if available (#13301)

Chris Pepper преди 5 години
родител
ревизия
38bef9da91
променени са 2 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 1
    1
      Marlin/src/core/serial.h
  2. 1
    0
      Marlin/src/module/temperature.cpp

+ 1
- 1
Marlin/src/core/serial.h Целия файл

@@ -42,11 +42,11 @@ enum MarlinDebugFlags : uint8_t {
42 42
 extern uint8_t marlin_debug_flags;
43 43
 #define DEBUGGING(F) (marlin_debug_flags & (MARLIN_DEBUG_## F))
44 44
 
45
+#define SERIAL_BOTH 0x7F
45 46
 #if NUM_SERIAL > 1
46 47
   extern int8_t serial_port_index;
47 48
   #define _PORT_REDIRECT(n,p)   REMEMBER(n,serial_port_index,p)
48 49
   #define _PORT_RESTORE(n)      RESTORE(n)
49
-  #define SERIAL_BOTH 0x7F
50 50
   #define SERIAL_OUT(WHAT, ...) do{ \
51 51
     if (!serial_port_index || serial_port_index == SERIAL_BOTH) MYSERIAL0.WHAT(__VA_ARGS__); \
52 52
     if ( serial_port_index) MYSERIAL1.WHAT(__VA_ARGS__); \

+ 1
- 0
Marlin/src/module/temperature.cpp Целия файл

@@ -2660,6 +2660,7 @@ void Temperature::isr() {
2660 2660
     void Temperature::auto_report_temperatures() {
2661 2661
       if (auto_report_temp_interval && ELAPSED(millis(), next_temp_report_ms)) {
2662 2662
         next_temp_report_ms = millis() + 1000UL * auto_report_temp_interval;
2663
+        PORT_REDIRECT(SERIAL_BOTH);
2663 2664
         print_heater_states(active_extruder);
2664 2665
         SERIAL_EOL();
2665 2666
       }

Loading…
Отказ
Запис