segment & bus.show mutex redesign
* separate mutexes for improved performance: - busses.show and effect drawing - critical changes to segment vector - block out critical segment changes while strip.service() loops over segments * UDP realtime acquires mutex before drawing - prevents corrupted outputs, caused by parallel tasks updating pixels while busses.show() runs
This commit is contained in:
@@ -478,7 +478,9 @@ void WLED::setup()
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
busDrawMux = xSemaphoreCreateRecursiveMutex(); // WLEDMM prevent concurrent running of strip.show and strip.service
|
||||
segmentMux = xSemaphoreCreateRecursiveMutex(); // WLEDMM prevent segment changes while effects are running
|
||||
xSemaphoreGiveRecursive(busDrawMux); // init semaphores to initially allow drawing
|
||||
xSemaphoreGiveRecursive(segmentMux);
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
|
||||
Reference in New Issue
Block a user