Fork of the espurna firmware for `mhsw` switches
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
558 B

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