Skip to content

Commit

Permalink
Better EEPROM alert message
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and Alexander Yasnogor committed Aug 7, 2020
1 parent 356b0bb commit c571feb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Marlin/src/lcd/menu/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ bool MarlinUI::update_selection() {
return selection;
}

void MenuItem_confirm::select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
void MenuItem_confirm::select_screen(
PGM_P const yes, PGM_P const no,
selectFunc_t yesFunc, selectFunc_t noFunc,
PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/
) {
const bool ui_selection = ui.update_selection(), got_click = ui.use_click();
if (got_click || ui.should_draw()) {
draw_select_screen(yes, no, ui_selection, pref, string, suff);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ void MarlinUI::update() {
#if HAS_LCD_MENU
editable.uint8 = msgid;
goto_screen([]{
PGM_P const restore_msg = GET_TEXT(MSG_RESTORE_DEFAULTS);
PGM_P const restore_msg = GET_TEXT(MSG_INIT_EEPROM);
char msg[utf8_strlen_P(restore_msg) + 1];
strcpy_P(msg, restore_msg);
MenuItem_confirm::select_screen(
Expand Down

0 comments on commit c571feb

Please sign in to comment.