♻️ Apply F() to more LCD code (#24228)
This commit is contained in:
committed by
Scott Lahteine
parent
9a74bcd4cf
commit
28f8646aa6
@@ -51,7 +51,7 @@ void xatc_wizard_done() {
|
||||
ui.goto_screen(menu_advanced_settings);
|
||||
}
|
||||
if (ui.should_draw())
|
||||
MenuItem_static::draw(LCD_HEIGHT >= 4, GET_TEXT(MSG_XATC_DONE));
|
||||
MenuItem_static::draw(LCD_HEIGHT >= 4, GET_TEXT_F(MSG_XATC_DONE));
|
||||
ui.refresh(LCDVIEW_CALL_REDRAW_NEXT);
|
||||
}
|
||||
|
||||
@@ -62,14 +62,14 @@ void xatc_wizard_goto_next_point();
|
||||
//
|
||||
void xatc_wizard_update_z_offset() {
|
||||
MenuItem_confirm::select_screen(
|
||||
GET_TEXT(MSG_YES), GET_TEXT(MSG_NO)
|
||||
GET_TEXT_F(MSG_YES), GET_TEXT_F(MSG_NO)
|
||||
, []{
|
||||
probe.offset.z = z_offset;
|
||||
ui.goto_screen(xatc_wizard_done);
|
||||
}
|
||||
, xatc_wizard_done
|
||||
, GET_TEXT(MSG_XATC_UPDATE_Z_OFFSET)
|
||||
, ftostr42_52(z_offset), PSTR("?")
|
||||
, GET_TEXT_F(MSG_XATC_UPDATE_Z_OFFSET)
|
||||
, ftostr42_52(z_offset), F("?")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void xatc_wizard_menu() {
|
||||
if (LCD_HEIGHT >= 4)
|
||||
STATIC_ITEM(MSG_MOVE_NOZZLE_TO_BED, SS_CENTER|SS_INVERT);
|
||||
|
||||
STATIC_ITEM_P(PSTR("Z="), SS_CENTER, ftostr42_52(current_position.z));
|
||||
STATIC_ITEM_F(F("Z="), SS_CENTER, ftostr42_52(current_position.z));
|
||||
STATIC_ITEM(MSG_ZPROBE_ZOFFSET, SS_LEFT, ftostr42_52(calculated_z_offset));
|
||||
|
||||
SUBMENU(MSG_MOVE_1MM, []{ _goto_manual_move_z( 1); });
|
||||
@@ -106,12 +106,12 @@ void xatc_wizard_menu() {
|
||||
!UNEAR_ZERO((FINE_MANUAL_MOVE) * 100 - int((FINE_MANUAL_MOVE) * 100)) ? 3 : 2;
|
||||
sprintf_P(tmp, GET_TEXT(MSG_MOVE_N_MM), dtostrf(FINE_MANUAL_MOVE, 1, digs, numstr));
|
||||
#if DISABLED(HAS_GRAPHICAL_TFT)
|
||||
SUBMENU_P(NUL_STR, []{ _goto_manual_move_z(float(FINE_MANUAL_MOVE)); });
|
||||
SUBMENU_F(FPSTR(NUL_STR), []{ _goto_manual_move_z(float(FINE_MANUAL_MOVE)); });
|
||||
MENU_ITEM_ADDON_START(0 + ENABLED(HAS_MARLINUI_HD44780));
|
||||
lcd_put_u8str(tmp);
|
||||
MENU_ITEM_ADDON_END();
|
||||
#else
|
||||
SUBMENU_P(tmp, []{ _goto_manual_move_z(float(FINE_MANUAL_MOVE)); });
|
||||
SUBMENU_F(FPSTR(tmp), []{ _goto_manual_move_z(float(FINE_MANUAL_MOVE)); });
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ void xatc_wizard_moving() {
|
||||
if (ui.should_draw()) {
|
||||
char msg[10];
|
||||
sprintf_P(msg, PSTR("%i / %u"), manual_probe_index + 1, XATC_MAX_POINTS);
|
||||
MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_LEVEL_BED_NEXT_POINT), msg);
|
||||
MenuEditItemBase::draw_edit_screen(GET_TEXT_F(MSG_LEVEL_BED_NEXT_POINT), msg);
|
||||
}
|
||||
ui.refresh(LCDVIEW_CALL_NO_REDRAW);
|
||||
if (!ui.wait_for_move) ui.goto_screen(xatc_wizard_menu);
|
||||
@@ -180,7 +180,7 @@ void xatc_wizard_goto_next_point() {
|
||||
//
|
||||
void xatc_wizard_homing_done() {
|
||||
if (ui.should_draw()) {
|
||||
MenuItem_static::draw(1, GET_TEXT(MSG_LEVEL_BED_WAITING));
|
||||
MenuItem_static::draw(1, GET_TEXT_F(MSG_LEVEL_BED_WAITING));
|
||||
|
||||
// Color UI needs a control to detect a touch
|
||||
#if BOTH(TOUCH_SCREEN, HAS_GRAPHICAL_TFT)
|
||||
|
||||
Reference in New Issue
Block a user