File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -479,8 +479,10 @@ void WLED::setup()
479479 #ifdef ARDUINO_ARCH_ESP32
480480 busDrawMux = xSemaphoreCreateRecursiveMutex (); // WLEDMM prevent concurrent running of strip.show and strip.service
481481 segmentMux = xSemaphoreCreateRecursiveMutex (); // WLEDMM prevent segment changes while effects are running
482+ jsonBufferLockMutex = xSemaphoreCreateRecursiveMutex (); // WLEDMM prevent concurrent JSON buffer writing
482483 xSemaphoreGiveRecursive (busDrawMux); // init semaphores to initially allow drawing
483484 xSemaphoreGiveRecursive (segmentMux);
485+ xSemaphoreGiveRecursive (jsonBufferLockMutex);
484486 #endif
485487
486488 #ifdef ARDUINO_ARCH_ESP32
Original file line number Diff line number Diff line change @@ -770,6 +770,7 @@ WLED_GLOBAL volatile bool OTAisRunning _INIT(false); // WLEDMM temporaril
770770#ifdef ARDUINO_ARCH_ESP32
771771WLED_GLOBAL SemaphoreHandle_t busDrawMux _INIT (nullptr );
772772WLED_GLOBAL SemaphoreHandle_t segmentMux _INIT (nullptr );
773+ WLED_GLOBAL SemaphoreHandle_t jsonBufferLockMutex _INIT (nullptr );
773774#define esp32SemTake (mux,timeout ) xSemaphoreTakeRecursive(mux, timeout) // convenience macro that expands to xSemaphoreTakeRecursive
774775#define esp32SemGive (mux ) xSemaphoreGiveRecursive(mux) // convenience macro that expands to xSemaphoreGiveRecursive
775776#define WLED_create_spinlock (theSname ) static portMUX_TYPE theSname = portMUX_INITIALIZER_UNLOCKED
You can’t perform that action at this time.
0 commit comments