1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 13:25:54 +00:00

fix ammeter ui references, now that we return mA instead of A

This commit is contained in:
Dave Gateman 2024-05-23 03:22:01 -06:00
parent 91f04f448d
commit d8422e7f68
2 changed files with 6 additions and 6 deletions

View File

@ -683,12 +683,12 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr
FORCE_INLINE void _draw_ammeter_status() {
lcd_put_u8str(F(" "));
ammeter.read();
if (ammeter.current <= 0.999f) {
lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f)));
if (ammeter.current < 1000) {
lcd_put_u8str(ftostr31rj((ammeter.current)));
lcd_put_u8str(F("mA"));
}
else {
lcd_put_u8str(ftostr12ns(ammeter.current));
lcd_put_u8str(ftostr12ns(ammeter.current / 1000));
lcd_put_u8str(F("A"));
}
}

View File

@ -557,16 +557,16 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
lcd_moveto(10, 5); lcd_put_u8str(F("ILAZ"));
ammeter.read();
lcd_moveto(11, 6);
if (ammeter.current <= 0.999f)
if (ammeter.current < 1.0f)
{
lcd_put_u8str("mA");
lcd_moveto(10, 7);
lcd_put_u8str(F(" ")); lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f)));
lcd_put_u8str(F(" ")); lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current ));
}
else {
lcd_put_u8str(" A");
lcd_moveto(10, 7);
lcd_put_u8str(ftostr12ns(ammeter.current));
lcd_put_u8str(ftostr12ns(ammeter.current*1000));
}
if (ammeter.current) picBits |= ICON_BED;