fix confetti animation
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user