From 92390d1d5909f4b070957a0e5e92f8bb5230a544 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sun, 4 Jun 2023 17:55:29 +0200 Subject: [PATCH] Bugfix in DDP handling. --- wled00/e131.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/e131.cpp b/wled00/e131.cpp index 2a80de37..68c7ca5a 100644 --- a/wled00/e131.cpp +++ b/wled00/e131.cpp @@ -25,7 +25,7 @@ void handleDDPPacket(e131_packet_t* p) { } } - uint8_t ddpChannelsPerLed = (p->dataType & 0b00111000 == 0b011) ? 4 : 3; // data type 0x1B (formerly 0x1A) is RGBW (type 3, 8 bit/channel) + uint8_t ddpChannelsPerLed = ((p->dataType & 0b00111000)>>3 == 0b011) ? 4 : 3; // data type 0x1B (formerly 0x1A) is RGBW (type 3, 8 bit/channel) uint32_t start = htonl(p->channelOffset) / ddpChannelsPerLed; start += DMXAddress / ddpChannelsPerLed;