diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index e641a1431b..3a9a24a51c 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -191,6 +191,7 @@ #define STR_ERR_HOTEND_TOO_COLD "Hotend too cold" #define STR_ERR_EEPROM_WRITE "Error writing to EEPROM!" #define STR_ERR_EEPROM_CORRUPT "EEPROM Corrupt" +#define STR_EEPROM_INITIALIZED "EEPROM Initialized" #define STR_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle" #define STR_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button" diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index fa8b2cfa4b..531bec1fda 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -496,6 +496,7 @@ namespace LanguageNarrow_en { LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings"); LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restore Defaults"); LSTR MSG_INIT_EEPROM = _UxGT("Initialize EEPROM"); + LSTR MSG_EEPROM_INITIALIZED = _UxGT("EEPROM Initialized"); LSTR MSG_ERR_EEPROM_CRC = _UxGT("Err: EEPROM CRC"); LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Err: EEPROM Size"); LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: EEPROM Version"); @@ -1098,6 +1099,7 @@ namespace LanguageWide_en { LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest Job Time"); LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded Total"); LSTR MSG_HOMING_FEEDRATE_N = _UxGT("@ Homing Feedrate"); + LSTR MSG_EEPROM_INITIALIZED = _UxGT("Default Settings Restored"); #endif } diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index fa7b5d1f13..51677fdec6 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -3100,17 +3100,24 @@ void MarlinSettings::postprocess() { #endif // HAS_EARLY_LCD_SETTINGS bool MarlinSettings::load() { + // If the EEPROM data is valid load it if (validate()) { const EEPROM_Error err = _load(); const bool success = (err == ERR_EEPROM_NOERR); TERN_(EXTENSIBLE_UI, ExtUI::onSettingsLoaded(success)); return success; } + + // Otherwise reset settings to default "factory settings" reset(); + + // Options to overwrite the EEPROM on error #if ANY(EEPROM_AUTO_INIT, EEPROM_INIT_NOW) - (void)save(); - SERIAL_ECHO_MSG("EEPROM Initialized"); + (void)init_eeprom(); + LCD_MESSAGE(MSG_EEPROM_INITIALIZED); + SERIAL_ECHO_MSG(STR_EEPROM_INITIALIZED); #endif + return false; }