From fb3816e2e5121c1a04353b351b9dc231f47fff46 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sun, 22 Oct 2023 17:53:16 +0200 Subject: [PATCH] Possible fix for: - #3382 - #3312 --- wled00/led.cpp | 3 ++- wled00/wled_server.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wled00/led.cpp b/wled00/led.cpp index bdbce301..37e77d1e 100644 --- a/wled00/led.cpp +++ b/wled00/led.cpp @@ -165,6 +165,8 @@ void updateInterfaces(uint8_t callMode) sendDataWs(); lastInterfaceUpdate = millis(); + interfaceUpdateCallMode = 0; //disable further updates + if (callMode == CALL_MODE_WS_SEND) return; #ifndef WLED_DISABLE_ALEXA @@ -174,7 +176,6 @@ void updateInterfaces(uint8_t callMode) } #endif doPublishMqtt = true; - interfaceUpdateCallMode = 0; //disable } diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 3f104913..47d68fd1 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -211,6 +211,8 @@ void initServer() if (verboseResponse) { if (!isConfig) { + lastInterfaceUpdate = millis(); // prevent WS update until cooldown + interfaceUpdateCallMode = CALL_MODE_WS_SEND; // schedule WS update serveJson(request); return; //if JSON contains "v" } else { doSerializeConfig = true; //serializeConfig(); //Save new settings to FS