Skip to content

Commit 1e42ebf

Browse files
committed
mask out flag bits in DDP type for compatibility
1 parent e4a7eff commit 1e42ebf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

wled00/e131.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ static void handleDDPPacket(e131_packet_t* p) {
2222
int lastPushSeq = e131LastSequenceNumber[0];
2323

2424
// reject unsupported color data types (only RGB and RGBW are supported)
25-
if (p->dataType != DDP_TYPE_RGB24 && p->dataType != DDP_TYPE_RGBW32) return;
25+
uint8_t maskedType = p->dataType & 0x3F; // mask out custom and reserved flags, only type bits are relevant
26+
if (maskedType != DDP_TYPE_RGB24 && maskedType != DDP_TYPE_RGBW32) return;
2627

2728
// reject status and config packets (not implemented)
2829
if (p->destination == DDP_ID_STATUS || p->destination == DDP_ID_CONFIG) return;

0 commit comments

Comments
 (0)