Add "psave" field to state JSON

This commit is contained in:
cschwinne 2019-11-25 00:20:00 +01:00
parent 095429a7df
commit 767b57fc01
3 changed files with 7 additions and 5 deletions

View File

@ -99,7 +99,7 @@
//version code in format yymmddb (b = daily build)
#define VERSION 1911211
#define VERSION 1911251
char versionString[] = "0.8.7-dev";

View File

@ -85,10 +85,6 @@ void wledInit()
//HTTP server page init
initServer();
strip.service();
initConnection();
}
@ -241,6 +237,9 @@ byte stacO = 0;
void handleConnection() {
//TODO: reconnect if heap <8000
if (millis() < 2000 && (!WLED_WIFI_CONFIGURED || apBehavior == 2)) return;
if (lastReconnectAttempt == 0) initConnection();
byte stac = 0;
#ifdef ESP8266
stac = wifi_softap_get_station_num();

View File

@ -105,6 +105,9 @@ bool deserializeState(JsonObject root)
}
colorUpdated(noNotification ? 5:1);
ps = root["psave"] | -1;
if (ps >= 0) savePreset(ps);
return stateResponse;
}