Missing UDP sync notifications bugfix.

This commit is contained in:
Blaz Kristan 2022-12-05 22:56:44 +01:00
parent e7f07f5bfc
commit e629c90a71
3 changed files with 4 additions and 2 deletions

View File

@ -403,6 +403,7 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
// if preset contains HTTP API call do not change presetCycCurr // if preset contains HTTP API call do not change presetCycCurr
if (root["win"].isNull()) presetCycCurr = currentPreset; if (root["win"].isNull()) presetCycCurr = currentPreset;
stateChanged = false; // cancel state change update (preset was set directly by applying values stored in UI JSON array) stateChanged = false; // cancel state change update (preset was set directly by applying values stored in UI JSON array)
notify(callMode);
} else if (root["win"].isNull() && getVal(root["ps"], &ps, 0, 0) && ps > 0 && ps < 251 && ps != currentPreset) { } else if (root["win"].isNull() && getVal(root["ps"], &ps, 0, 0) && ps > 0 && ps < 251 && ps != currentPreset) {
// b) preset ID only or preset that does not change state (use embedded cycling limits if they exist in getVal()) // b) preset ID only or preset that does not change state (use embedded cycling limits if they exist in getVal())
presetCycCurr = ps; presetCycCurr = ps;

View File

@ -181,7 +181,8 @@ void handlePresets()
#endif #endif
releaseJSONBufferLock(); // will also clear fileDoc releaseJSONBufferLock(); // will also clear fileDoc
colorUpdated(tmpMode); if (changePreset) notify(tmpMode); // force UDP notification
stateUpdated(tmpMode); // was colorUpdated() if anything breaks
updateInterfaces(tmpMode); updateInterfaces(tmpMode);
} }

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2212030 #define VERSION 2212050
//uncomment this if you have a "my_config.h" file you'd like to use //uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG //#define WLED_USE_MY_CONFIG