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))
{
Serial.println(F("No config file on internal flash."));
//No config file on internal flash.
SDCard sdc;
if (!sdc.loadConfigFile(&Settings))
{
Serial.println(F("No config file on SD card."));
forceConfig = true;
//No config file on SD card.
sdc.SD2SPIStorage(&SPIFS); // reboot on success.
}
else
{
Serial.println(F("Config file on SD card. Copy and restart."));
sdc.SD2SPIStorage(&SPIFS); // reboot on success.
//Config file on SD card. Copy and restart.
forceConfig = true;
}
};