Compare commits
1 Commits
4553957b6a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5589962422 |
@@ -117,11 +117,17 @@ static void animTickTask(void* pvParams) {
|
||||
TickType_t lastWake = xTaskGetTickCount();
|
||||
|
||||
while (true) {
|
||||
// Drain commandQueue — process ALL pending commands before this frame
|
||||
// Drain commandQueue — process ALL pending commands before this frame.
|
||||
// Guard against NULL: commandQueue is only created in startUdpServer(),
|
||||
// which is called only after WiFi connects. If WiFi never connects (e.g.
|
||||
// wrong credentials, no AP) commandQueue stays NULL and xQueueReceive()
|
||||
// would panic. Skip queue drain safely until UDP server is up.
|
||||
LedCommand cmd;
|
||||
if (commandQueue != NULL) {
|
||||
while (xQueueReceive(commandQueue, &cmd, 0) == pdTRUE) {
|
||||
applyCommand(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
// Tick Schrank (WS2801, RGB, 160 LEDs, isRGBW=false)
|
||||
if (zoneSchrank.active && zoneSchrank.currentAnim) {
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
#include "config.h"
|
||||
|
||||
// SK6812: RGBW (4 bytes/LED) — MUST use NeoGrbwFeature, never NeoRgbFeature
|
||||
// NeoEsp32RmtNWs2812xMethod uses RMT channel N (0-indexed).
|
||||
// On ESP32-C3 (RISC-V single-core), only RMT channels 0 and 1 are available.
|
||||
// NeoEsp32Rmt0Ws2812xMethod = channel 0, pinned to PIN_SK6812 at runtime.
|
||||
using StripWand = NeoPixelBus<NeoGrbwFeature, NeoEsp32Rmt0Ws2812xMethod>;
|
||||
// WS2801: RGB (3 bytes/LED), 2MHz SPI for cable-safe 5m run
|
||||
using StripSchrank = NeoPixelBus<NeoRgbFeature, NeoWs2801Spi2MhzMethod>;
|
||||
using StripSchrank = NeoPixelBus<NeoRgbFeature, Ws2801Spi2MhzMethod>;
|
||||
|
||||
extern StripWand stripWand;
|
||||
extern StripSchrank stripSchrank;
|
||||
|
||||
Reference in New Issue
Block a user