Mirror of espurna firmware for wireless switches and more
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
560 B

#if GARLAND_SUPPORT
#include "../anim.h"
#include "../palette.h"
//------------------------------------------------------------------------------
class AnimRandCyc : public Anim {
public:
AnimRandCyc() : Anim("RandCyc") {
}
void SetupImpl() override {
for (auto i = 0; i < numLeds; ++i)
seq[i] = rngb();
}
void Run() override {
for (auto i = 0; i < numLeds; ++i) {
leds[i] = palette->getCachedPalColor(seq[i]);
seq[i] += rngb() >> 6;
}
}
};
#endif // GARLAND_SUPPORT