Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit ac14be6

Browse files
authored
Merge pull request #29 from hmueller01/fix-eeprom-compiler-error
fix compiler error if EEPROM is used
2 parents 85f9435 + b19fd4b commit ac14be6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/ESPAsync_WiFiManager_Lite.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,8 @@ class ESPAsync_WiFiManager_Lite
13011301

13021302
bool extLoadDynamicData()
13031303
{
1304+
#if ( USE_LITTLEFS || USE_SPIFFS )
1305+
13041306
#if ESP8266
13051307
// SPIFFS and LittleFS do auto-format if not yet
13061308
if (!FileFS.begin())
@@ -1314,12 +1316,20 @@ class ESPAsync_WiFiManager_Lite
13141316
}
13151317

13161318
return loadDynamicData();
1319+
1320+
#else // #if ( USE_LITTLEFS || USE_SPIFFS )
1321+
1322+
return EEPROM_getDynamicData();
1323+
1324+
#endif // #if ( USE_LITTLEFS || USE_SPIFFS )
13171325
}
13181326

13191327
//////////////////////////////////////////////
13201328

13211329
void extSaveDynamicData()
13221330
{
1331+
#if ( USE_LITTLEFS || USE_SPIFFS )
1332+
13231333
#if ESP8266
13241334
// SPIFFS and LittleFS do auto-format if not yet
13251335
if (!FileFS.begin())
@@ -1333,6 +1343,12 @@ class ESPAsync_WiFiManager_Lite
13331343
}
13341344

13351345
saveDynamicData();
1346+
1347+
#else // #if ( USE_LITTLEFS || USE_SPIFFS )
1348+
1349+
EEPROM_putDynamicData();
1350+
1351+
#endif // #if ( USE_LITTLEFS || USE_SPIFFS )
13361352
}
13371353

13381354
#endif

0 commit comments

Comments
 (0)