Sort out settings.load with SD EEPROM emulation (#14458)

This commit is contained in:
Tanguy Pruvot
2019-07-01 16:10:17 +02:00
committed by Scott Lahteine
parent c9be936d4a
commit 108d0df565
6 changed files with 31 additions and 15 deletions

View File

@ -941,7 +941,9 @@ void setup() {
// Load data from EEPROM if available (or use defaults)
// This also updates variables in the planner, elsewhere
(void)settings.load();
#if DISABLED(SD_EEPROM_EMULATION)
(void)settings.load();
#endif
#if HAS_M206_COMMAND
// Initialize current position based on home_offset
@ -1094,8 +1096,17 @@ void setup() {
init_closedloop();
#endif
#if ENABLED(INIT_SDCARD_ON_BOOT) && !HAS_SPI_LCD
card.beginautostart();
#if !HAS_SPI_LCD
#if ENABLED(SD_EEPROM_EMULATION)
SERIAL_ECHOLNPGM("Loading settings from SD");
(void)settings.load();
#endif
#if ENABLED(INIT_SDCARD_ON_BOOT)
card.beginautostart();
#endif
#endif
#if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF)