From 5151aa677fe706dbb70fed0231aacf2a58f0bec1 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Mon, 14 Feb 2022 16:16:38 +0100 Subject: [PATCH] Added ID for segment options syncing. --- wled00/udp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/udp.cpp b/wled00/udp.cpp index 2bae22745..2861d551b 100644 --- a/wled00/udp.cpp +++ b/wled00/udp.cpp @@ -329,10 +329,10 @@ void handleNotifications() for (uint8_t i = 0; i < srcSegs; i++) { uint16_t ofs = 41 + i*udpIn[40]; //start of segment offset byte uint8_t id = udpIn[0 +ofs]; - if (id > strip.getMaxSegments()) continue; + if (id > strip.getMaxSegments()) break; WS2812FX::Segment& selseg = strip.getSegment(id); //bytes 1+2 contain start, 3+4 stop, unused at this time - for (uint8_t j = 0; j<4; j++) selseg.setOption(j, (udpIn[9 +ofs] >> j) & 0x01); //only take into account mirrored, selected, on, reversed + for (uint8_t j = 0; j<4; j++) selseg.setOption(j, (udpIn[9 +ofs] >> j) & 0x01, id); //only take into account mirrored, selected, on, reversed selseg.setOpacity(udpIn[10+ofs], id); if (applyEffects) { strip.setMode(id, udpIn[11+ofs]);