|
|
|
@ -68,11 +68,7 @@
|
|
|
|
|
|
|
|
|
|
#elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008)
|
|
|
|
|
|
|
|
|
|
LCD_CLASS lcd(LCD_I2C_ADDRESS
|
|
|
|
|
#ifdef DETECT_DEVICE
|
|
|
|
|
, 1
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
|
LCD_CLASS lcd(LCD_I2C_ADDRESS OPTARG(DETECT_I2C_LCD_DEVICE, 1));
|
|
|
|
|
|
|
|
|
|
#elif ENABLED(LCD_I2C_TYPE_PCA8574)
|
|
|
|
|
|
|
|
|
@ -380,11 +376,7 @@ void MarlinUI::init_lcd() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MarlinUI::detected() {
|
|
|
|
|
return (true
|
|
|
|
|
#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE)
|
|
|
|
|
&& lcd.LcdDetected() == 1
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
|
return TERN1(DETECT_I2C_LCD_DEVICE, lcd.LcdDetected() == 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if HAS_SLOW_BUTTONS
|
|
|
|
@ -602,10 +594,11 @@ FORCE_INLINE void _draw_cooler_status(const char prefix, const bool blink) {
|
|
|
|
|
FORCE_INLINE void _draw_ammeter_status() {
|
|
|
|
|
lcd_put_u8str(" ");
|
|
|
|
|
ammeter.read();
|
|
|
|
|
if (ammeter.current <= .999) {
|
|
|
|
|
lcd_put_u8str(ftostr3ns(ammeter.current));
|
|
|
|
|
if (ammeter.current <= 0.999f) {
|
|
|
|
|
lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f)));
|
|
|
|
|
lcd_put_u8str("mA");
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
lcd_put_u8str(ftostr12ns(ammeter.current));
|
|
|
|
|
lcd_put_wchar('A');
|
|
|
|
|
}
|
|
|
|
@ -847,15 +840,9 @@ void MarlinUI::draw_status_screen() {
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if HAS_COOLER
|
|
|
|
|
_draw_cooler_status('*', blink);
|
|
|
|
|
#endif
|
|
|
|
|
#if ENABLED(LASER_COOLANT_FLOW_METER)
|
|
|
|
|
_draw_flowmeter_status();
|
|
|
|
|
#endif
|
|
|
|
|
#if ENABLED(I2C_AMMETER)
|
|
|
|
|
_draw_ammeter_status();
|
|
|
|
|
#endif
|
|
|
|
|
TERN_(HAS_COOLER, _draw_cooler_status('*', blink));
|
|
|
|
|
TERN_(LASER_COOLANT_FLOW_METER, _draw_flowmeter_status());
|
|
|
|
|
TERN_(I2C_AMMETER, _draw_ammeter_status());
|
|
|
|
|
|
|
|
|
|
#endif // LCD_WIDTH >= 20
|
|
|
|
|
|
|
|
|
|