improve stability of DDP via tcp_task (websockets)

* protect pixel buffer changes with critical section
* protect segment list modification with critical section
* make _isServicing and _triggered atomic (move out of packed bitarray)
* allow custom timeout for waitUntilIdle - DDP needs a longer timeout
* protect strip.show() and effect drawing functions with mutex, to prevent crashes
This commit is contained in:
Frank
2025-12-19 18:13:20 +01:00
parent 10c20b7a4b
commit c25f082231
6 changed files with 79 additions and 9 deletions

View File

@@ -162,9 +162,8 @@ void realtimeLock(uint32_t timeoutMs, byte md)
if (strip.isServicing()) {
USER_PRINTLN(F("realtimeLock() entering RTM: strip is still drawing effects."));
strip.waitUntilIdle();
strip.waitUntilIdle(350);
}
strip.service(); // WLEDMM make sure that all segments are properly initialized
busses.invalidateCache(true);
// WLEDMM end