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

Commit e61b589

Browse files
authored
Merge pull request #33 from hmueller01/fix_eeprom_compiler_error
fix compiler error if EEPROM is used
2 parents c8d59dc + c94cbbc commit e61b589

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/ESP_WiFiManager_Lite.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,8 @@ class ESP_WiFiManager_Lite
12771277

12781278
bool extLoadDynamicData()
12791279
{
1280+
#if ( USE_LITTLEFS || USE_SPIFFS )
1281+
12801282
#if ESP8266
12811283
// SPIFFS and LittleFS do auto-format if not yet
12821284
if (!FileFS.begin())
@@ -1290,12 +1292,20 @@ class ESP_WiFiManager_Lite
12901292
}
12911293

12921294
return loadDynamicData();
1295+
1296+
#else // #if ( USE_LITTLEFS || USE_SPIFFS )
1297+
1298+
return EEPROM_getDynamicData();
1299+
1300+
#endif // #if ( USE_LITTLEFS || USE_SPIFFS )
12931301
}
12941302

12951303
//////////////////////////////////////////////
12961304

12971305
void extSaveDynamicData()
12981306
{
1307+
#if ( USE_LITTLEFS || USE_SPIFFS )
1308+
12991309
#if ESP8266
13001310
// SPIFFS and LittleFS do auto-format if not yet
13011311
if (!FileFS.begin())
@@ -1309,6 +1319,12 @@ class ESP_WiFiManager_Lite
13091319
}
13101320

13111321
saveDynamicData();
1322+
1323+
#else // #if ( USE_LITTLEFS || USE_SPIFFS )
1324+
1325+
EEPROM_putDynamicData();
1326+
1327+
#endif // #if ( USE_LITTLEFS || USE_SPIFFS )
13121328
}
13131329

13141330
#endif

0 commit comments

Comments
 (0)