Przeglądaj źródła

Tweaks to heater / lcd conditions

Scott Lahteine 7 lat temu
rodzic
commit
083ec9963e

+ 17
- 16
Marlin/src/lcd/dogm/status_screen_DOGM.h Wyświetl plik

@@ -71,7 +71,7 @@ FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, cons
71 71
         );
72 72
   }
73 73
 
74
-  if (PAGE_CONTAINS(21, 28))
74
+  if (PAGE_CONTAINS(21, 28)) {
75 75
     _draw_centered_temp(0.5 + (
76 76
         #if HAS_HEATED_BED
77 77
           isBed ? thermalManager.degBed() :
@@ -80,21 +80,22 @@ FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, cons
80 80
       ), x, 28
81 81
     );
82 82
 
83
-  if (PAGE_CONTAINS(17, 20)) {
84
-    const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X,
85
-                  y = isBed ? 18 : 17;
86
-    if (
87
-      #if HAS_HEATED_BED
88
-        isBed ? thermalManager.isHeatingBed() :
89
-      #endif
90
-      thermalManager.isHeatingHotend(heater)
91
-    ) {
92
-      u8g.setColorIndex(0); // white on black
93
-      u8g.drawBox(x + h, y, 2, 2);
94
-      u8g.setColorIndex(1); // black on white
83
+    if (PAGE_CONTAINS(17, 20)) {
84
+      const uint8_t h = isBed ? 7 : HEAT_INDICATOR_X,
85
+                    y = isBed ? 18 : 17;
86
+      if (
87
+        #if HAS_HEATED_BED
88
+          isBed ? thermalManager.isHeatingBed() :
89
+        #endif
90
+        thermalManager.isHeatingHotend(heater)
91
+      ) {
92
+        u8g.setColorIndex(0); // white on black
93
+        u8g.drawBox(x + h, y, 2, 2);
94
+        u8g.setColorIndex(1); // black on white
95
+      }
96
+      else
97
+        u8g.drawBox(x + h, y, 2, 2);
95 98
     }
96
-    else
97
-      u8g.drawBox(x + h, y, 2, 2);
98 99
   }
99 100
 }
100 101
 
@@ -225,7 +226,7 @@ static void lcd_implementation_status_screen() {
225 226
     #endif
226 227
 
227 228
     #if HAS_FAN0
228
-      if (PAGE_CONTAINS(20, 27)) {
229
+      if (PAGE_CONTAINS(STATUS_SCREEN_FAN_TEXT_Y - 7, STATUS_SCREEN_FAN_TEXT_Y)) {
229 230
         // Fan
230 231
         const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
231 232
         if (per) {

+ 5
- 5
Marlin/src/lcd/ultralcd.cpp Wyświetl plik

@@ -864,8 +864,8 @@ void lcd_quick_feedback(const bool clear_buttons) {
864 864
     bool abort_sd_printing; // =false
865 865
 
866 866
     void lcd_sdcard_stop() {
867
-      abort_sd_printing = true;
868 867
       wait_for_heatup = wait_for_user = false;
868
+      abort_sd_printing = true;
869 869
       lcd_setstatusPGM(PSTR(MSG_PRINT_ABORTED), -1);
870 870
       lcd_return_to_status();
871 871
 
@@ -1684,7 +1684,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
1684 1684
     void lcd_preheat_m2_bedonly() { _lcd_preheat(0, 0, lcd_preheat_bed_temp[1], lcd_preheat_fan_speed[1]); }
1685 1685
   #endif
1686 1686
 
1687
-  #if HAS_TEMP_HOTEND && (TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || HAS_HEATED_BED)
1687
+  #if HAS_TEMP_HOTEND || HAS_HEATED_BED
1688 1688
 
1689 1689
     void lcd_preheat_m1_menu() {
1690 1690
       START_MENU();
@@ -1696,7 +1696,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
1696 1696
         #else
1697 1697
           MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
1698 1698
         #endif
1699
-      #else
1699
+      #elif HOTENDS > 1
1700 1700
         #if HAS_HEATED_BED
1701 1701
           MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0);
1702 1702
           MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E1, lcd_preheat_m1_e0_only);
@@ -1748,7 +1748,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
1748 1748
         #else
1749 1749
           MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
1750 1750
         #endif
1751
-      #else
1751
+      #elif HOTENDS > 1
1752 1752
         #if HAS_HEATED_BED
1753 1753
           MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0);
1754 1754
           MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E1, lcd_preheat_m2_e0_only);
@@ -1790,7 +1790,7 @@ void lcd_quick_feedback(const bool clear_buttons) {
1790 1790
       END_MENU();
1791 1791
     }
1792 1792
 
1793
-  #endif // HAS_TEMP_HOTEND && (TEMP_SENSOR_1 || TEMP_SENSOR_2 || TEMP_SENSOR_3 || TEMP_SENSOR_4 || TEMP_SENSOR_BED)
1793
+  #endif // HAS_TEMP_HOTEND || HAS_HEATED_BED
1794 1794
 
1795 1795
   void lcd_cooldown() {
1796 1796
     #if FAN_COUNT > 0

+ 8
- 8
Marlin/src/lcd/ultralcd_impl_HD44780.h Wyświetl plik

@@ -584,7 +584,7 @@ static void lcd_implementation_status_screen() {
584 584
     //
585 585
     // Hotend 1 or Bed Temperature
586 586
     //
587
-    #if HOTENDS > 1 || TEMP_SENSOR_BED
587
+    #if HOTENDS > 1 || HAS_HEATED_BED
588 588
 
589 589
       lcd_moveto(8, 0);
590 590
       #if HOTENDS > 1
@@ -595,7 +595,7 @@ static void lcd_implementation_status_screen() {
595 595
         _draw_heater_status(-1, -1, blink);
596 596
       #endif
597 597
 
598
-    #endif // HOTENDS > 1 || TEMP_SENSOR_BED
598
+    #endif // HOTENDS > 1 || HAS_HEATED_BED
599 599
 
600 600
   #else // LCD_WIDTH >= 20
601 601
 
@@ -607,7 +607,7 @@ static void lcd_implementation_status_screen() {
607 607
     //
608 608
     // Hotend 1 or Bed Temperature
609 609
     //
610
-    #if HOTENDS > 1 || TEMP_SENSOR_BED
610
+    #if HOTENDS > 1 || HAS_HEATED_BED
611 611
       lcd_moveto(10, 0);
612 612
       #if HOTENDS > 1
613 613
         _draw_heater_status(1, LCD_STR_THERMOMETER[0], blink);
@@ -620,7 +620,7 @@ static void lcd_implementation_status_screen() {
620 620
         ), blink);
621 621
       #endif
622 622
 
623
-    #endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
623
+    #endif // HOTENDS > 1 || HAS_HEATED_BED
624 624
 
625 625
   #endif // LCD_WIDTH >= 20
626 626
 
@@ -649,7 +649,7 @@ static void lcd_implementation_status_screen() {
649 649
       // If the first line has two extruder temps,
650 650
       // show more temperatures on the next line
651 651
 
652
-      #if HOTENDS > 2 || (HOTENDS > 1 && TEMP_SENSOR_BED)
652
+      #if HOTENDS > 2 || (HOTENDS > 1 && HAS_HEATED_BED)
653 653
 
654 654
         #if HOTENDS > 2
655 655
           _draw_heater_status(2, LCD_STR_THERMOMETER[0], blink);
@@ -663,7 +663,7 @@ static void lcd_implementation_status_screen() {
663 663
           LCD_BEDTEMP_CHAR
664 664
         ), blink);
665 665
 
666
-      #else // HOTENDS <= 2 && (HOTENDS <= 1 || !TEMP_SENSOR_BED)
666
+      #else // HOTENDS <= 2 && (HOTENDS <= 1 || !HAS_HEATED_BED)
667 667
 
668 668
         _draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])), blink);
669 669
 
@@ -671,14 +671,14 @@ static void lcd_implementation_status_screen() {
671 671
 
672 672
         _draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])), blink);
673 673
 
674
-      #endif // HOTENDS <= 2 && (HOTENDS <= 1 || !TEMP_SENSOR_BED)
674
+      #endif // HOTENDS <= 2 && (HOTENDS <= 1 || !HAS_HEATED_BED)
675 675
 
676 676
     #endif // LCD_WIDTH >= 20
677 677
 
678 678
     lcd_moveto(LCD_WIDTH - 8, 1);
679 679
     _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position[Z_AXIS])), blink);
680 680
 
681
-    #if HAS_LEVELING && !TEMP_SENSOR_BED
681
+    #if HAS_LEVELING && !HAS_HEATED_BED
682 682
       lcd_put_wchar(planner.leveling_active || blink ? '_' : ' ');
683 683
     #endif
684 684
 

+ 3
- 1
Marlin/src/module/temperature.cpp Wyświetl plik

@@ -1126,7 +1126,9 @@ void Temperature::init() {
1126 1126
     inited = true;
1127 1127
   #endif
1128 1128
 
1129
-  #if MB(RUMBA) && (TEMP_SENSOR_0 == -1 || TEMP_SENSOR_1 == -1 || TEMP_SENSOR_2 == -1 || TEMP_SENSOR_BED == -1 || TEMP_SENSOR_CHAMBER == -1)
1129
+  #if MB(RUMBA) && ( \
1130
+       ENABLED(HEATER_0_USES_AD595)  || ENABLED(HEATER_1_USES_AD595)  || ENABLED(HEATER_2_USES_AD595)  || ENABLED(HEATER_3_USES_AD595)  || ENABLED(HEATER_4_USES_AD595)  || ENABLED(HEATER_BED_USES_AD595)  || ENABLED(HEATER_CHAMBER_USES_AD595) \
1131
+    || ENABLED(HEATER_0_USES_AD8495) || ENABLED(HEATER_1_USES_AD8495) || ENABLED(HEATER_2_USES_AD8495) || ENABLED(HEATER_3_USES_AD8495) || ENABLED(HEATER_4_USES_AD8495) || ENABLED(HEATER_BED_USES_AD8495) || ENABLED(HEATER_CHAMBER_USES_AD8495))
1130 1132
     // Disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
1131 1133
     MCUCR = _BV(JTD);
1132 1134
     MCUCR = _BV(JTD);

Ładowanie…
Anuluj
Zapisz