pitrix/src/effect_firework.cpp

14 lines
331 B
C++
Raw Normal View History

#include "effect_firework.h"
#include "my_fastled.h"
#include "functions.h"
#include "config.h"
void FireworkEffect::loop() {
blur(EFFECT_FIREWORK_BLUR);
fadeToBlackBy(leds, LED_COUNT, EFFECT_FIREWORK_FADEOUT_SPEED);
2019-06-07 04:24:16 +00:00
if (random8(EFFECT_FIREWORK_SHOT_CHANCE)==0) {
leds[random16(LED_COUNT)] = CHSV(random8(), 255, 255);
}
}