From 43f5e4360deb91ed2e1e2f43a29098fcaa4a1c5a Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sat, 6 Jan 2024 20:28:05 +0100 Subject: [PATCH] Changelog update Remove obsolete semaphore --- CHANGELOG.md | 9 +++++++-- wled00/json.cpp | 13 ------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae4121484..17c37c530 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ ## WLED changelog -#### Build 2309120 till build 2312290 +#### Build 2309120 till build 2201060 - WLED version 0.15.0-a0 +- Global JSON buffer guarding (#3648 by @willmmiles, resolves #3641, #3312, #3367, #3637, #3646, #3447) +- Effect: Fireworks 1D (fix for matrix trailing strip) +- BREAKING: Reduced number of segments (12) on ESP8266 due to less available RAM +- Increased available effect data buffer (increases more if board has PSRAM) +- Custom palette editor mobile UI enhancement (by @imeszaros) - Per port Auto Brightness Limiter (ABL) - Use PSRAM for JSON buffer (double size, larger ledmaps, up to 2k) - Reduced heap fragmentation by allocating ledmap array only once and not deallocating effect buffer @@ -26,7 +31,7 @@ - Better reverse proxy support (nested paths) - Implement global JSON API boolean toggle (i.e. instead of "var":true or "var":false -> "var":"t"). - Sort presets by ID -- Fix for #3496, #2922, #3593, #3514, #3522, #3578 (partial), #3606 (@WoodyLetsCode) +- Fix for #3641, #3312, #3367, #3637, #3646, #3447, #3632, #3496, #2922, #3593, #3514, #3522, #3578 (partial), #3606 (@WoodyLetsCode) - Improved random bg image and added random bg image options (@WoodyLetsCode, #3481) - Audio palettes (Audioreactive usermod, credit @netmindz) - Better UI tooltips (@ajotnac, #3464) diff --git a/wled00/json.cpp b/wled00/json.cpp index ccec74ed8..8a3bfbe63 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -1020,15 +1020,8 @@ class GlobalBufferAsyncJsonResponse: public JSONBufferGuard, public AsyncJsonRes }; -static volatile bool servingClient = false; void serveJson(AsyncWebServerRequest* request) { - if (servingClient) { - serveJsonError(request, 503, ERR_CONCURRENCY); - return; - } - servingClient = true; - byte subJson = 0; const String& url = request->url(); if (url.indexOf("state") > 0) subJson = JSON_PATH_STATE; @@ -1042,29 +1035,24 @@ void serveJson(AsyncWebServerRequest* request) #ifdef WLED_ENABLE_JSONLIVE else if (url.indexOf("live") > 0) { serveLiveLeds(request); - servingClient = false; return; } #endif else if (url.indexOf("pal") > 0) { request->send_P(200, "application/json", JSON_palette_names); - servingClient = false; return; } else if (url.indexOf("cfg") > 0 && handleFileRead(request, "/cfg.json")) { - servingClient = false; return; } else if (url.length() > 6) { //not just /json serveJsonError(request, 501, ERR_NOT_IMPL); - servingClient = false; return; } GlobalBufferAsyncJsonResponse *response = new GlobalBufferAsyncJsonResponse(subJson==JSON_PATH_FXDATA || subJson==JSON_PATH_EFFECTS); // will clear and convert JsonDocument into JsonArray if necessary if (!response->owns_lock()) { serveJsonError(request, 503, ERR_NOBUF); - servingClient = false; delete response; return; } @@ -1110,7 +1098,6 @@ void serveJson(AsyncWebServerRequest* request) DEBUG_PRINT(F("JSON content length: ")); DEBUG_PRINTLN(len); request->send(response); - servingClient = false; } #ifdef WLED_ENABLE_JSONLIVE