From cca41508bc6fadf8d033c047e361db4f3383385d Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Mon, 30 Jan 2023 21:56:36 +0000 Subject: [PATCH] E1.31: Ignore non-zero start code and preview data These are not level data, they have other purposes --- wled00/e131.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wled00/e131.cpp b/wled00/e131.cpp index fa1cd37c..729ba65f 100644 --- a/wled00/e131.cpp +++ b/wled00/e131.cpp @@ -70,8 +70,14 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){ seq = p->art_sequence_number; mde = REALTIME_MODE_ARTNET; } 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; + // 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; seq = p->sequence_number; if (e131Priority != 0) {