fixes trail flickering randomly. thx @blazoncek for discovering

This commit is contained in:
Damian Schneider 2025-01-31 14:10:03 +01:00
parent 32a75c1ff5
commit b64cd36468

View File

@ -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 {