diff --git a/wled00/e131.cpp b/wled00/e131.cpp index 1c16e148..2a80de37 100644 --- a/wled00/e131.cpp +++ b/wled00/e131.cpp @@ -25,7 +25,7 @@ void handleDDPPacket(e131_packet_t* p) { } } - uint8_t ddpChannelsPerLed = (p->dataType == DDP_TYPE_RGBW32) ? 4 : 3; // data type 0x1A is RGBW (type 3, 8 bit/channel) + uint8_t ddpChannelsPerLed = (p->dataType & 0b00111000 == 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; diff --git a/wled00/src/dependencies/e131/ESPAsyncE131.h b/wled00/src/dependencies/e131/ESPAsyncE131.h index 3132ca6c..40d7154e 100644 --- a/wled00/src/dependencies/e131/ESPAsyncE131.h +++ b/wled00/src/dependencies/e131/ESPAsyncE131.h @@ -53,8 +53,8 @@ typedef struct ip_addr ip4_addr_t; #define DDP_PUSH_FLAG 0x01 #define DDP_TIMECODE_FLAG 0x10 -#define DDP_TYPE_RGB24 0x0A -#define DDP_TYPE_RGBW32 0x1A +#define DDP_TYPE_RGB24 0x0B // 00 001 011 (RGB , 8 bits per channel, 3 channels) +#define DDP_TYPE_RGBW32 0x1B // 00 011 011 (RGBW, 8 bits per channel, 4 channels) #define ARTNET_OPCODE_OPDMX 0x5000 #define ARTNET_OPCODE_OPPOLL 0x2000