FastLED 3.10.8
Loading...
Searching...
No Matches

◆ pacifica_one_layer()

void fl::Pacifica::pacifica_one_layer ( fl::span< CRGB > leds,
CRGBPalette16 & p,
u16 cistart,
u16 wavescale,
u8 bri,
u16 ioff )
private

Definition at line 90 of file pacifica.h.

92 {
93 u16 ci = cistart;
94 u16 waveangle = ioff;
95 u16 wavescale_half = (wavescale / 2) + 20;
96 for (u16 i = 0; i < mNumLeds; i++) {
97 waveangle += 250;
98 u16 s16 = sin16(waveangle) + 32768;
99 u16 cs = scale16(s16, wavescale_half) + wavescale_half;
100 ci += cs;
101 u16 sindex16 = sin16(ci) + 32768;
102 u8 sindex8 = scale16(sindex16, 240);
103 CRGB c = ColorFromPalette(p, sindex8, bri, LINEARBLEND);
104 leds[i] += c;
105 }
106}
CRGB leds[1]
u16 mNumLeds
Definition fx.h:53
unsigned char u8
Definition stdint.h:131
fl::CRGB CRGB
Definition video.h:18
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType) FL_NO_EXCEPT

References fl::ColorFromPalette(), fl::FL_NO_EXCEPT, leds, and fl::Fx::mNumLeds.

+ Here is the call graph for this function: