Quellcode durchsuchen

🐛 Fix Ammeter display on DOGM (#22384)

Mike La Spina vor 3 Jahren
Ursprung
Commit
286f6ba0bd
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden

+ 3
- 3
Marlin/src/lcd/dogm/dogm_Statusscreen.h Datei anzeigen

@@ -624,7 +624,7 @@
624 624
     #define STATUS_AMMETER_X (LCD_PIXEL_WIDTH - (STATUS_AMMETER_BYTEWIDTH + STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8)
625 625
   #endif
626 626
   #ifndef STATUS_AMMETER_HEIGHT
627
-    #define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp1) / (STATUS_AMMETER_BYTEWIDTH))
627
+    #define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp_mA) / (STATUS_AMMETER_BYTEWIDTH))
628 628
   #endif
629 629
   #ifndef STATUS_AMMETER_Y
630 630
     #define STATUS_AMMETER_Y(S) (18 - STATUS_AMMETER_HEIGHT(S))
@@ -633,8 +633,8 @@
633 633
     #define STATUS_AMMETER_TEXT_X (STATUS_AMMETER_X + 7)
634 634
   #endif
635 635
   static_assert(
636
-    sizeof(status_ammeter_bmp1) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0),
637
-    "Status ammeter bitmap (status_ammeter_bmp1) dimensions don't match data."
636
+    sizeof(status_ammeter_bmp_mA) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0),
637
+    "Status ammeter bitmap (status_ammeter_bmp_mA) dimensions don't match data."
638 638
   );
639 639
 #endif
640 640
 

+ 4
- 0
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Datei anzeigen

@@ -57,6 +57,10 @@
57 57
   #include "../../feature/cooler.h"
58 58
 #endif
59 59
 
60
+#if ENABLED(I2C_AMMETER)
61
+  #include "../../feature/ammeter.h"
62
+#endif
63
+
60 64
 #if HAS_POWER_MONITOR
61 65
   #include "../../feature/power_monitor.h"
62 66
 #endif

Laden…
Abbrechen
Speichern