Only handle e131Priority for P_E131 protocol

This commit is contained in:
mxklb 2023-01-16 13:06:33 +01:00
parent 18687b5bef
commit e64ead5561

View File

@ -56,7 +56,7 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){
uint16_t uni = 0, dmxChannels = 0; uint16_t uni = 0, dmxChannels = 0;
uint8_t* e131_data = nullptr; uint8_t* e131_data = nullptr;
uint8_t seq = 0, mde = REALTIME_MODE_E131, prio = 0; uint8_t seq = 0, mde = REALTIME_MODE_E131;
if (protocol == P_ARTNET) if (protocol == P_ARTNET)
{ {
@ -74,16 +74,14 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){
dmxChannels = htons(p->property_value_count) -1; dmxChannels = htons(p->property_value_count) -1;
e131_data = p->property_values; e131_data = p->property_values;
seq = p->sequence_number; seq = p->sequence_number;
prio = p->priority; // skip packages != config priority
if (e131Priority != 0 && p->priority != e131Priority) return;
} else { //DDP } else { //DDP
realtimeIP = clientIP; realtimeIP = clientIP;
handleDDPPacket(p); handleDDPPacket(p);
return; return;
} }
// when priority != 0: skip packages with priority != config priority
if ((e131Priority != 0 && prio != 0) && prio != e131Priority) return;
#ifdef WLED_ENABLE_DMX #ifdef WLED_ENABLE_DMX
// does not act on out-of-order packets yet // does not act on out-of-order packets yet
if (e131ProxyUniverse > 0 && uni == e131ProxyUniverse) { if (e131ProxyUniverse > 0 && uni == e131ProxyUniverse) {