From fa1106d3cf5a18cd46d4097a8bcecdd343ba4269 Mon Sep 17 00:00:00 2001 From: Matchlighter Date: Fri, 29 Jan 2021 23:11:37 -0700 Subject: [PATCH] Add DNRGBW Mode for Real Time UDP Control Add DNRGBW mode so that >367 RGBW LEDs may be controlled, similar to the DNRGB mode. --- wled00/udp.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wled00/udp.cpp b/wled00/udp.cpp index 2b098ac2..240510d3 100644 --- a/wled00/udp.cpp +++ b/wled00/udp.cpp @@ -315,6 +315,15 @@ void handleNotifications() setRealtimePixel(id, udpIn[i], udpIn[i+1], udpIn[i+2], 0); id++; } + } else if (udpIn[0] == 5) //dnrgbw + { + uint16_t id = ((udpIn[3] << 0) & 0xFF) + ((udpIn[2] << 8) & 0xFF00); + for (uint16_t i = 4; i < packetSize -2; i += 4) + { + if (id >= ledCount) break; + setRealtimePixel(id, udpIn[i], udpIn[i+1], udpIn[i+2], udpIn[i+3]); + id++; + } } strip.show(); return;