From 84e2c07780f46518eb987d85749f8181e6488ad5 Mon Sep 17 00:00:00 2001 From: Ryrumeli Date: Fri, 17 Jul 2026 00:54:51 -0300 Subject: [PATCH] Fix a frame bug with the effect Stream that after a certain time will start skipping Tested in my ESP32 Wroom. Basically, there was an oversight where the 32 bits float is tested against a temporary 16 bit variable. As soon as it extrapolates (In the highest speed for the effect in about over an hour) there is an erratic shit that happens instead of the desired effect. Just applying a similar solution to the one in Stream 2 fixed it completely. --- wled00/FX.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 99ded1b928..7f285db741 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -1179,7 +1179,7 @@ void mode_running_random(void) { uint16_t PRNG16 = SEGENV.aux0; unsigned z = it % zoneSize; - bool nzone = (!z && it != SEGENV.aux1); + bool nzone = (!z && (it & 0xFFFF) != SEGENV.aux1); for (int i=SEGLEN-1; i >= 0; i--) { if (nzone || z >= zoneSize) { unsigned lastrand = PRNG16 >> 8; @@ -1198,7 +1198,7 @@ void mode_running_random(void) { z++; } - SEGENV.aux1 = it; + SEGENV.aux1 = it & 0xFFFF; } static const char _data_FX_MODE_RUNNING_RANDOM[] PROGMEM = "Stream@!,Zone size;;!";