From 18687b5bef98ff7be3c3f23d96a9ffe601ba2f68 Mon Sep 17 00:00:00 2001 From: mxklb Date: Tue, 10 Jan 2023 00:07:34 +0100 Subject: [PATCH] Enable E1.31 priority handling for WLED_ENABLE_DMX --- wled00/e131.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/wled00/e131.cpp b/wled00/e131.cpp index 9852a2ae..719e5440 100644 --- a/wled00/e131.cpp +++ b/wled00/e131.cpp @@ -81,6 +81,9 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){ return; } + // when priority != 0: skip packages with priority != config priority + if ((e131Priority != 0 && prio != 0) && prio != e131Priority) return; + #ifdef WLED_ENABLE_DMX // does not act on out-of-order packets yet if (e131ProxyUniverse > 0 && uni == e131ProxyUniverse) { @@ -90,12 +93,6 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){ } #endif - // ignore packages by priority - if (prio != 0) - if (e131Priority != 0) - if (prio != e131Priority) - return; - // only listen for universes we're handling & allocated memory if (uni < e131Universe || uni >= (e131Universe + E131_MAX_UNIVERSE_COUNT)) return;