Skip to content

Commit fa1106d

Browse files
authored
Add DNRGBW Mode for Real Time UDP Control
Add DNRGBW mode so that >367 RGBW LEDs may be controlled, similar to the DNRGB mode.
1 parent 0266370 commit fa1106d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

wled00/udp.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,15 @@ void handleNotifications()
315315
setRealtimePixel(id, udpIn[i], udpIn[i+1], udpIn[i+2], 0);
316316
id++;
317317
}
318+
} else if (udpIn[0] == 5) //dnrgbw
319+
{
320+
uint16_t id = ((udpIn[3] << 0) & 0xFF) + ((udpIn[2] << 8) & 0xFF00);
321+
for (uint16_t i = 4; i < packetSize -2; i += 4)
322+
{
323+
if (id >= ledCount) break;
324+
setRealtimePixel(id, udpIn[i], udpIn[i+1], udpIn[i+2], udpIn[i+3]);
325+
id++;
326+
}
318327
}
319328
strip.show();
320329
return;

0 commit comments

Comments
 (0)