@@ -1295,6 +1295,48 @@ class ESPAsync_WiFiManager_Lite
1295
1295
1296
1296
// ////////////////////////////////////
1297
1297
1298
+ #if USE_DYNAMIC_PARAMETERS
1299
+
1300
+ bool extLoadDynamicData ()
1301
+ {
1302
+ #if ESP8266
1303
+ // SPIFFS and LittleFS do auto-format if not yet
1304
+ if (!FileFS.begin ())
1305
+ #else
1306
+ // Format SPIFFS if not yet
1307
+ if (!FileFS.begin (true ))
1308
+ #endif
1309
+ {
1310
+ ESP_WML_LOGERROR (F (" SPIFFS/LittleFS failed!" ));
1311
+ return false ;
1312
+ }
1313
+
1314
+ return loadDynamicData ();
1315
+ }
1316
+
1317
+ // ////////////////////////////////////////////
1318
+
1319
+ void extSaveDynamicData ()
1320
+ {
1321
+ #if ESP8266
1322
+ // SPIFFS and LittleFS do auto-format if not yet
1323
+ if (!FileFS.begin ())
1324
+ #else
1325
+ // Format SPIFFS if not yet
1326
+ if (!FileFS.begin (true ))
1327
+ #endif
1328
+ {
1329
+ ESP_WML_LOGERROR (F (" SPIFFS/LittleFS failed!" ));
1330
+ return ;
1331
+ }
1332
+
1333
+ saveDynamicData ();
1334
+ }
1335
+
1336
+ #endif
1337
+
1338
+ // ////////////////////////////////////
1339
+
1298
1340
1299
1341
private:
1300
1342
String ipAddress = " 0.0.0.0" ;
@@ -1313,6 +1355,7 @@ class ESPAsync_WiFiManager_Lite
1313
1355
1314
1356
unsigned long configTimeout;
1315
1357
bool hadConfigData = false ;
1358
+ bool hadDynamicData = false ;
1316
1359
1317
1360
bool isForcedConfigPortal = false ;
1318
1361
bool persForcedConfigPortal = false ;
@@ -1696,6 +1739,11 @@ class ESPAsync_WiFiManager_Lite
1696
1739
1697
1740
bool loadDynamicData ()
1698
1741
{
1742
+ if (hadDynamicData)
1743
+ {
1744
+ return true ;
1745
+ }
1746
+
1699
1747
int checkSum = 0 ;
1700
1748
int readCheckSum;
1701
1749
totalDataSize = sizeof (ESP_WM_LITE_config) + sizeof (readCheckSum);
@@ -1748,6 +1796,7 @@ class ESPAsync_WiFiManager_Lite
1748
1796
return false ;
1749
1797
}
1750
1798
1799
+ hadDynamicData = true ;
1751
1800
return true ;
1752
1801
}
1753
1802
0 commit comments