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

Handle temp callbacks when THERMAL_PROTECTION_HOTENDS is not defined

by alternate definition for the callback macros
AnHardt преди 9 години
родител
ревизия
bb4efcf603
променени са 1 файла, в които са добавени 24 реда и са изтрити 10 реда
  1. 24
    10
      Marlin/ultralcd.cpp

+ 24
- 10
Marlin/ultralcd.cpp Целия файл

@@ -477,19 +477,33 @@ void lcd_set_home_offsets() {
477 477
 /**
478 478
  * Watch temperature callbacks
479 479
  */
480
-#if TEMP_SENSOR_0 != 0
481
-  void watch_temp_callback_E0() { start_watching_heater(0); }
482
-#endif
483
-#if EXTRUDERS > 1 && TEMP_SENSOR_1 != 0
484
-  void watch_temp_callback_E1() { start_watching_heater(1); }
480
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
481
+  #if TEMP_SENSOR_0 != 0
482
+    void watch_temp_callback_E0() { start_watching_heater(0); }
483
+  #endif
484
+  #if EXTRUDERS > 1 && TEMP_SENSOR_1 != 0
485
+    void watch_temp_callback_E1() { start_watching_heater(1); }
486
+  #endif // EXTRUDERS > 1
485 487
   #if EXTRUDERS > 2 && TEMP_SENSOR_2 != 0
486 488
     void watch_temp_callback_E2() { start_watching_heater(2); }
487
-    #if EXTRUDERS > 3 && TEMP_SENSOR_3 != 0
488
-      void watch_temp_callback_E3() { start_watching_heater(3); }
489
-    #endif // EXTRUDERS > 3
490 489
   #endif // EXTRUDERS > 2
491
-#endif // EXTRUDERS > 1
492
-
490
+  #if EXTRUDERS > 3 && TEMP_SENSOR_3 != 0
491
+    void watch_temp_callback_E3() { start_watching_heater(3); }
492
+  #endif // EXTRUDERS > 3
493
+#else
494
+  #if TEMP_SENSOR_0 != 0
495
+    void watch_temp_callback_E0() {}
496
+  #endif
497
+  #if EXTRUDERS > 1 && TEMP_SENSOR_1 != 0
498
+    void watch_temp_callback_E1() {}
499
+  #endif // EXTRUDERS > 1
500
+  #if EXTRUDERS > 2 && TEMP_SENSOR_2 != 0
501
+    void watch_temp_callback_E2() {}
502
+  #endif // EXTRUDERS > 2
503
+  #if EXTRUDERS > 3 && TEMP_SENSOR_3 != 0
504
+    void watch_temp_callback_E3() {}
505
+  #endif // EXTRUDERS > 3
506
+#endif
493 507
 /**
494 508
  * Items shared between Tune and Temperature menus
495 509
  */

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