FastLED 3.9.15
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 88 of file pacifica.h.

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

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

Referenced by draw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: