From d6e2473ea79ee9e618d98c1596a4e9eee010db7b Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Tue, 23 Dec 2025 00:41:45 +0100 Subject: [PATCH] small update for code clarity wraping esp32SemGive inro #ifdef ESP32 does not change the behavior, but makes the logic easier to understand. --- wled00/util.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wled00/util.cpp b/wled00/util.cpp index be93ef1d..a10b87c5 100644 --- a/wled00/util.cpp +++ b/wled00/util.cpp @@ -238,7 +238,9 @@ bool requestJSONBufferLock(uint8_t module) #endif if (jsonBufferLock || !haveLock) { + #ifdef ARDUINO_ARCH_ESP32 if (haveLock) esp32SemGive(jsonBufferLockMutex); // we got the mutex, but jsonBufferLock says the opposite -> give up + #endif USER_PRINT(F("ERROR: Locking JSON buffer failed! (still locked by ")); USER_PRINT(jsonBufferLock); USER_PRINTLN(")"); @@ -263,7 +265,9 @@ void releaseJSONBufferLock() DEBUG_PRINTLN(")"); fileDoc = nullptr; jsonBufferLock = 0; + #ifdef ARDUINO_ARCH_ESP32 esp32SemGive(jsonBufferLockMutex); // return the mutex + #endif }