fix confetti animation

This commit is contained in:
2026-01-06 22:06:02 +01:00
parent 715d50c255
commit 733b05eaeb

View File

@ -153,16 +153,16 @@ static void anim_confetti(void)
uint16_t num_leds = led_get_num_leds_a() + led_get_num_leds_b();
uint16_t pos = random16(num_leds);
hsv_t hsv = {(uint8_t)(global_hue + random8()), 200, 255};
hsv_t hsv = {(uint8_t)(global_hue + random8()), 255, 255};
rgb_t color = led_hsv_to_rgb(hsv);
if (pos < led_get_num_leds_a())
{
led_add_pixel_a(pos, color);
led_set_pixel_a(led_get_num_leds_a() - pos - 1, color);
}
else
{
led_add_pixel_b(pos - led_get_num_leds_a(), color);
led_set_pixel_b(pos - led_get_num_leds_a(), color);
}
}
@ -389,7 +389,7 @@ void animation_update(void)
anim_rainbow_glitter();
break;
case ANIM_CONFETTI:
// anim_confetti();
anim_confetti();
break;
case ANIM_SINELON:
anim_sinelon();