mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-24 04:29:34 +00:00
🐛 Fix Ammeter display on DOGM (#22384)
This commit is contained in:
parent
1a0103d276
commit
286f6ba0bd
@ -624,7 +624,7 @@
|
|||||||
#define STATUS_AMMETER_X (LCD_PIXEL_WIDTH - (STATUS_AMMETER_BYTEWIDTH + STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8)
|
#define STATUS_AMMETER_X (LCD_PIXEL_WIDTH - (STATUS_AMMETER_BYTEWIDTH + STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8)
|
||||||
#endif
|
#endif
|
||||||
#ifndef STATUS_AMMETER_HEIGHT
|
#ifndef STATUS_AMMETER_HEIGHT
|
||||||
#define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp1) / (STATUS_AMMETER_BYTEWIDTH))
|
#define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp_mA) / (STATUS_AMMETER_BYTEWIDTH))
|
||||||
#endif
|
#endif
|
||||||
#ifndef STATUS_AMMETER_Y
|
#ifndef STATUS_AMMETER_Y
|
||||||
#define STATUS_AMMETER_Y(S) (18 - STATUS_AMMETER_HEIGHT(S))
|
#define STATUS_AMMETER_Y(S) (18 - STATUS_AMMETER_HEIGHT(S))
|
||||||
@ -633,8 +633,8 @@
|
|||||||
#define STATUS_AMMETER_TEXT_X (STATUS_AMMETER_X + 7)
|
#define STATUS_AMMETER_TEXT_X (STATUS_AMMETER_X + 7)
|
||||||
#endif
|
#endif
|
||||||
static_assert(
|
static_assert(
|
||||||
sizeof(status_ammeter_bmp1) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0),
|
sizeof(status_ammeter_bmp_mA) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0),
|
||||||
"Status ammeter bitmap (status_ammeter_bmp1) dimensions don't match data."
|
"Status ammeter bitmap (status_ammeter_bmp_mA) dimensions don't match data."
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -57,6 +57,10 @@
|
|||||||
#include "../../feature/cooler.h"
|
#include "../../feature/cooler.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(I2C_AMMETER)
|
||||||
|
#include "../../feature/ammeter.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_POWER_MONITOR
|
#if HAS_POWER_MONITOR
|
||||||
#include "../../feature/power_monitor.h"
|
#include "../../feature/power_monitor.h"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user