From 043947fdcb389675365de3fcdcc342c64a86bedb Mon Sep 17 00:00:00 2001 From: mxklb Date: Wed, 23 Nov 2022 00:38:42 +0100 Subject: [PATCH] Added missing brightness to preset DMX mode --- wled00/e131.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wled00/e131.cpp b/wled00/e131.cpp index 310a3ea7..3c8fbe4f 100644 --- a/wled00/e131.cpp +++ b/wled00/e131.cpp @@ -162,9 +162,13 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){ setRealtimePixel(i, e131_data[dataOffset+1], e131_data[dataOffset+2], e131_data[dataOffset+3], wChannel); break; - case DMX_MODE_PRESET: // 1 channel: WLED Preset number [#] - if (uni != e131Universe || availDMXLen < 1) return; - applyPreset(e131_data[dataOffset], CALL_MODE_NOTIFICATION); + case DMX_MODE_PRESET: // 2 channel: [Dimmer,Preset] + if (uni != e131Universe || availDMXLen < 2) return; + applyPreset(e131_data[dataOffset+1], CALL_MODE_NOTIFICATION); + if (bri != e131_data[dataOffset]) { + bri = e131_data[dataOffset]; + strip.setBrightness(bri, true); + } return; break;