prepare for builds without SD support

This commit is contained in:
elmo128 2023-09-14 23:18:08 +02:00
parent 80618d3cdc
commit 2e5be19a60

View File

@ -86,17 +86,18 @@ void init_WifiManager()
if (!SPIFS.loadConfigFile(&Settings)) if (!SPIFS.loadConfigFile(&Settings))
{ {
Serial.println(F("No config file on internal flash.")); //No config file on internal flash.
SDCard sdc; SDCard sdc;
if (!sdc.loadConfigFile(&Settings)) if (!sdc.loadConfigFile(&Settings))
{ {
Serial.println(F("No config file on SD card.")); //No config file on SD card.
forceConfig = true; sdc.SD2SPIStorage(&SPIFS); // reboot on success.
} }
else else
{ {
Serial.println(F("Config file on SD card. Copy and restart.")); //Config file on SD card. Copy and restart.
sdc.SD2SPIStorage(&SPIFS); // reboot on success. forceConfig = true;
} }
}; };