Update Probe Offset Wizard for Color UI (#19742)
This commit is contained in:
parent
57dc1a0649
commit
02b668baf5
@ -88,16 +88,20 @@ void probe_offset_wizard_menu() {
|
|||||||
SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move_z( 0.1f); });
|
SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move_z( 0.1f); });
|
||||||
|
|
||||||
if ((SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) {
|
if ((SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) {
|
||||||
extern const char NUL_STR[];
|
char tmp[20], numstr[10];
|
||||||
SUBMENU_P(NUL_STR, []{ _goto_manual_move_z(float(SHORT_MANUAL_Z_MOVE)); });
|
// Determine digits needed right of decimal
|
||||||
MENU_ITEM_ADDON_START(0 + ENABLED(HAS_MARLINUI_HD44780));
|
const uint8_t digs = !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 1000 - int((SHORT_MANUAL_Z_MOVE) * 1000)) ? 4 :
|
||||||
char tmp[20], numstr[10];
|
!UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 100 - int((SHORT_MANUAL_Z_MOVE) * 100)) ? 3 : 2;
|
||||||
// Determine digits needed right of decimal
|
sprintf_P(tmp, GET_TEXT(MSG_MOVE_Z_DIST), dtostrf(SHORT_MANUAL_Z_MOVE, 1, digs, numstr));
|
||||||
const uint8_t digs = !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 1000 - int((SHORT_MANUAL_Z_MOVE) * 1000)) ? 4 :
|
#if DISABLED(HAS_GRAPHICAL_TFT)
|
||||||
!UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 100 - int((SHORT_MANUAL_Z_MOVE) * 100)) ? 3 : 2;
|
extern const char NUL_STR[];
|
||||||
sprintf_P(tmp, GET_TEXT(MSG_MOVE_Z_DIST), dtostrf(SHORT_MANUAL_Z_MOVE, 1, digs, numstr));
|
SUBMENU_P(NUL_STR, []{ _goto_manual_move_z(float(SHORT_MANUAL_Z_MOVE)); });
|
||||||
|
MENU_ITEM_ADDON_START(0 + ENABLED(HAS_MARLINUI_HD44780));
|
||||||
lcd_put_u8str(tmp);
|
lcd_put_u8str(tmp);
|
||||||
MENU_ITEM_ADDON_END();
|
MENU_ITEM_ADDON_END();
|
||||||
|
#else
|
||||||
|
SUBMENU_P(tmp, []{ _goto_manual_move_z(float(SHORT_MANUAL_Z_MOVE)); });
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ACTION_ITEM(MSG_BUTTON_DONE, []{
|
ACTION_ITEM(MSG_BUTTON_DONE, []{
|
||||||
|
Loading…
Reference in New Issue
Block a user