瀏覽代碼

🐛 Fix Ammeter display on DOGM (#22384)

Mike La Spina 3 年之前
父節點
當前提交
286f6ba0bd
沒有連結到貢獻者的電子郵件帳戶。
共有 2 個檔案被更改,包括 7 行新增3 行删除
  1. 3
    3
      Marlin/src/lcd/dogm/dogm_Statusscreen.h
  2. 4
    0
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp

+ 3
- 3
Marlin/src/lcd/dogm/dogm_Statusscreen.h 查看文件

@@ -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 查看文件

@@ -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

Loading…
取消
儲存