From e629c90a71587d08991a3912bb4f75d95faad1f3 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Mon, 5 Dec 2022 22:56:44 +0100 Subject: [PATCH] Missing UDP sync notifications bugfix. --- wled00/json.cpp | 1 + wled00/presets.cpp | 3 ++- wled00/wled.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wled00/json.cpp b/wled00/json.cpp index 3b40c3e82..b253746f9 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -403,6 +403,7 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId) // if preset contains HTTP API call do not change presetCycCurr if (root["win"].isNull()) presetCycCurr = currentPreset; 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) { // b) preset ID only or preset that does not change state (use embedded cycling limits if they exist in getVal()) presetCycCurr = ps; diff --git a/wled00/presets.cpp b/wled00/presets.cpp index 826f3395a..7db00a87d 100644 --- a/wled00/presets.cpp +++ b/wled00/presets.cpp @@ -181,7 +181,8 @@ void handlePresets() #endif releaseJSONBufferLock(); // will also clear fileDoc - colorUpdated(tmpMode); + if (changePreset) notify(tmpMode); // force UDP notification + stateUpdated(tmpMode); // was colorUpdated() if anything breaks updateInterfaces(tmpMode); } diff --git a/wled00/wled.h b/wled00/wled.h index 13fd71397..e262f037f 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // 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 //#define WLED_USE_MY_CONFIG