Zalohovani stare konfigurace
This commit is contained in:
parent
95a15b11dc
commit
cbeac02edc
@ -471,6 +471,10 @@ void WiFiConfig::_handleSetAP(AsyncWebServerRequest *request)
|
||||
if (str.length() > 0) {
|
||||
uint8_t mode;
|
||||
|
||||
if (USEDFS.exists(F(WIFICFG_OLD_FILE))) {
|
||||
USEDFS.remove(F(WIFICFG_OLD_FILE));
|
||||
}
|
||||
USEDFS.rename(F(WIFICFG_FILE), F(WIFICFG_OLD_FILE));
|
||||
strEncode(str);
|
||||
svSetV(F("ssid"), str, F(WIFICFG_FILE));
|
||||
str = request->arg(F("_p"));
|
||||
|
@ -44,6 +44,9 @@
|
||||
#if not defined(WIFICFG_FILE)
|
||||
# define WIFICFG_FILE "/wifi.json"
|
||||
#endif
|
||||
#if not defined(WIFICFG_OLD_FILE)
|
||||
# define WIFICFG_OLD_FILE "/wifi.old"
|
||||
#endif
|
||||
|
||||
// Parametr, predany uzivatelske callback funkci, urceny pro aplikacni vizualizaci stavu konfigurace a pripojeni
|
||||
typedef enum {
|
||||
|
Loading…
Reference in New Issue
Block a user