Option to Auto-Initialize EEPROM (#13935)

This commit is contained in:
InsanityAutomation authored and Scott Lahteine committed 2019-05-07 16:30:31 -05:00
1 parent a504366138
commit 5dcb25664f
98 files changed
+1450 -1059

No files matched your search

+9 -1
View File
@@ -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