Skip to content

Commit 331844f

Browse files
authored
Merge pull request wled#1708 from Matchlighter/patch-1
Add DNRGBW Mode for Real Time UDP Control
2 parents d580ded + fa1106d commit 331844f

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)