Skip to content

Commit

Permalink
Fixes first pixel not being set in Stream FX (#4542)
Browse files Browse the repository at this point in the history
* Fixes first pixel not being set
* added fix to Stream 2 as well
  • Loading branch information
DedeHai authored Feb 8, 2025
1 parent 35f8736 commit 4d53e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ uint16_t mode_running_random(void) {

unsigned z = it % zoneSize;
bool nzone = (!z && it != SEGENV.aux1);
for (unsigned i=SEGLEN-1; i > 0; i--) {
for (int i=SEGLEN-1; i >= 0; i--) {
if (nzone || z >= zoneSize) {
unsigned lastrand = PRNG16 >> 8;
int16_t diff = 0;
Expand Down Expand Up @@ -1768,7 +1768,7 @@ uint16_t mode_random_chase(void) {
uint32_t color = SEGENV.step;
random16_set_seed(SEGENV.aux0);

for (unsigned i = SEGLEN -1; i > 0; i--) {
for (int i = SEGLEN -1; i >= 0; i--) {
uint8_t r = random8(6) != 0 ? (color >> 16 & 0xFF) : random8();
uint8_t g = random8(6) != 0 ? (color >> 8 & 0xFF) : random8();
uint8_t b = random8(6) != 0 ? (color & 0xFF) : random8();
Expand Down

0 comments on commit 4d53e0a

Please sign in to comment.