Option to Auto-Initialize EEPROM (#13935)
This commit is contained in:
committed by
Scott Lahteine
parent
a504366138
commit
5dcb25664f
@ -955,7 +955,15 @@ void setup() {
|
||||
|
||||
// Load data from EEPROM if available (or use defaults)
|
||||
// This also updates variables in the planner, elsewhere
|
||||
(void)settings.load();
|
||||
#if ENABLED(EEPROM_AUTO_INIT)
|
||||
if (!settings.load()) {
|
||||
(void)settings.reset();
|
||||
(void)settings.save();
|
||||
SERIAL_ECHO_MSG("EEPROM Initialized");
|
||||
}
|
||||
#else
|
||||
(void)settings.load();
|
||||
#endif
|
||||
|
||||
#if HAS_M206_COMMAND
|
||||
// Initialize current position based on home_offset
|
||||
|
Reference in New Issue
Block a user