mirror of
https://github.com/wled/WLED.git
synced 2025-04-24 14:57:18 +00:00
Add "psave" field to state JSON
This commit is contained in:
parent
095429a7df
commit
767b57fc01
@ -99,7 +99,7 @@
|
||||
|
||||
|
||||
//version code in format yymmddb (b = daily build)
|
||||
#define VERSION 1911211
|
||||
#define VERSION 1911251
|
||||
char versionString[] = "0.8.7-dev";
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
@ -105,6 +105,9 @@ bool deserializeState(JsonObject root)
|
||||
}
|
||||
colorUpdated(noNotification ? 5:1);
|
||||
|
||||
ps = root["psave"] | -1;
|
||||
if (ps >= 0) savePreset(ps);
|
||||
|
||||
return stateResponse;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user