From 2e5be19a60c47c41c3ea74fa393c7c968938314a Mon Sep 17 00:00:00 2001 From: elmo128 <60213508+elmo128@users.noreply.github.com> Date: Thu, 14 Sep 2023 23:18:08 +0200 Subject: [PATCH] prepare for builds without SD support --- src/wManager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/wManager.cpp b/src/wManager.cpp index e49164b..a1c526f 100644 --- a/src/wManager.cpp +++ b/src/wManager.cpp @@ -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; } };