9FASTLED_SMART_REF(
Cylon);
16 Cylon(uint16_t num_leds, uint8_t fade_amount = 250, uint8_t delay_ms = 10)
17 :
FxStrip(num_leds), delay_ms(delay_ms), fade_amount(fade_amount) {}
21 void lazyInit()
override {
26 if (context.leds ==
nullptr || mNumLeds == 0) {
30 CRGB *leds = context.leds;
33 leds[position] =
CHSV(hue++, 255, 255);
36 for (uint16_t i = 0; i < mNumLeds; i++) {
49 if (position >= int16_t(mNumLeds)) {
50 position = mNumLeds - 2;
56 const char *fxName(
int)
const override {
return "Cylon"; }
central include file for FastLED, defines the CFastLED class/object
An animation that moves a single LED back and forth (Larson Scanner effect)
void draw(DrawContext context) override
FASTLED_FORCE_INLINE CRGB & nscale8(uint8_t scaledown)
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Representation of an RGB pixel (Red, Green, Blue)