mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 08:46:34 +00:00
Fixes first pixel not being set in Stream FX (#4542)
* Fixes first pixel not being set * added fix to Stream 2 as well
This commit is contained in:
parent
cc4a4c4ae1
commit
2ac4d03160
@ -1091,7 +1091,7 @@ uint16_t mode_running_random(void) {
|
|||||||
|
|
||||||
unsigned z = it % zoneSize;
|
unsigned z = it % zoneSize;
|
||||||
bool nzone = (!z && it != SEGENV.aux1);
|
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) {
|
if (nzone || z >= zoneSize) {
|
||||||
unsigned lastrand = PRNG16 >> 8;
|
unsigned lastrand = PRNG16 >> 8;
|
||||||
int16_t diff = 0;
|
int16_t diff = 0;
|
||||||
@ -1739,7 +1739,7 @@ uint16_t mode_random_chase(void) {
|
|||||||
uint32_t color = SEGENV.step;
|
uint32_t color = SEGENV.step;
|
||||||
random16_set_seed(SEGENV.aux0);
|
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 r = random8(6) != 0 ? (color >> 16 & 0xFF) : random8();
|
||||||
uint8_t g = random8(6) != 0 ? (color >> 8 & 0xFF) : random8();
|
uint8_t g = random8(6) != 0 ? (color >> 8 & 0xFF) : random8();
|
||||||
uint8_t b = random8(6) != 0 ? (color & 0xFF) : random8();
|
uint8_t b = random8(6) != 0 ? (color & 0xFF) : random8();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user