E1.31: Ignore non-zero start code and preview data

These are not level data, they have other purposes
This commit is contained in:
RichardTea 2023-01-30 21:56:36 +00:00 committed by mxklb
parent c5569a2a48
commit cca41508bc

View File

@ -70,8 +70,14 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){
seq = p->art_sequence_number; seq = p->art_sequence_number;
mde = REALTIME_MODE_ARTNET; mde = REALTIME_MODE_ARTNET;
} else if (protocol == P_E131) { } else if (protocol == P_E131) {
uni = htons(p->universe); // Ignore PREVIEW data (E1.31: 6.2.6)
if ((p->options & 0x80) != 0)
return;
dmxChannels = htons(p->property_value_count) -1; dmxChannels = htons(p->property_value_count) -1;
// DMX level data is zero start code. Ignore everything else. (E1.11: 8.5)
if (dmxChannels == 0 || p->property_values[0] != 0)
return;
uni = htons(p->universe);
e131_data = p->property_values; e131_data = p->property_values;
seq = p->sequence_number; seq = p->sequence_number;
if (e131Priority != 0) { if (e131Priority != 0) {