35 if (ctx.leds.empty() ||
mNumLeds == 0) {
41 u16 brightnessthetainc16 =
beatsin88(203, (25 * 256), (40 * 256));
57 u8 hue8 = hue16 / 256;
59 brightnesstheta16 += brightnessthetainc16;
60 u16 b16 = sin16(brightnesstheta16) + 32768;
62 u16 bri16 = (fl::u32)((fl::u32)b16 * (fl::u32)b16) / 65536;
63 u8 bri8 = (fl::u32)(((fl::u32)bri16) * brightdepth) / 65536;
64 bri8 += (255 - brightdepth);
66 CRGB newcolor =
CHSV(hue8, sat8, bri8);
68 u16 pixelnumber = (
mNumLeds - 1) - i;
70 nblend(ctx.leds[pixelnumber], newcolor, 64);
Fx1d(u16 numLeds) FL_NO_EXCEPT
::fl::DrawContext DrawContext
fl::string fxName() const FL_NO_EXCEPT override
Pride2015(u16 num_leds) FL_NO_EXCEPT
void draw(Fx::DrawContext context) FL_NO_EXCEPT override
LIB8STATIC u16 beatsin88(accum88 beats_per_minute_88, u16 lowest=0, u16 highest=65535, u32 timebase=0, u16 phase_offset=0) FL_NO_EXCEPT
Generates a 16-bit sine wave at a given BPM that oscillates within a given range.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
fl::u32 millis() FL_NO_EXCEPT
Universal millisecond timer - returns milliseconds since system startup.
CRGB & nblend(CRGB &existing, const CRGB &overlay, fract8 amountOfOverlay) FL_NO_EXCEPT
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
Representation of an 8-bit RGB pixel (Red, Green, Blue)