mirror of
https://github.com/wled/WLED.git
synced 2025-07-21 09:46:32 +00:00
fixes trail flickering randomly. thx @blazoncek for discovering
This commit is contained in:
parent
32a75c1ff5
commit
b64cd36468
@ -2359,8 +2359,10 @@ uint16_t mode_meteor() {
|
|||||||
uint32_t col;
|
uint32_t col;
|
||||||
if (hw_random8() <= 255 - SEGMENT.intensity) {
|
if (hw_random8() <= 255 - SEGMENT.intensity) {
|
||||||
if(meteorSmooth) {
|
if(meteorSmooth) {
|
||||||
|
if (trail[i] > 0) {
|
||||||
int change = trail[i] + 4 - hw_random8(24); //change each time between -20 and +4
|
int change = trail[i] + 4 - hw_random8(24); //change each time between -20 and +4
|
||||||
trail[i] = constrain(change, 0, max);
|
trail[i] = constrain(change, 0, max);
|
||||||
|
}
|
||||||
col = SEGMENT.check1 ? SEGMENT.color_from_palette(i, true, false, 0, trail[i]) : SEGMENT.color_from_palette(trail[i], false, true, 255);
|
col = SEGMENT.check1 ? SEGMENT.color_from_palette(i, true, false, 0, trail[i]) : SEGMENT.color_from_palette(trail[i], false, true, 255);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user