114{
115 uint16_t ci = cistart;
116 uint16_t waveangle = ioff;
117 uint16_t wavescale_half = (wavescale / 2) + 20;
118 for( uint16_t i = 0; i <
NUM_LEDS; i++) {
119 waveangle += 250;
120 uint16_t s16 =
sin16( waveangle ) + 32768;
121 uint16_t cs =
scale16( s16 , wavescale_half ) + wavescale_half;
122 ci += cs;
123 uint16_t sindex16 =
sin16( ci) + 32768;
124 uint8_t sindex8 =
scale16( sindex16, 240);
127 }
128}
@ LINEARBLEND
Linear interpolation between palette entries, with wrap-around from end to the beginning again.
CRGB ColorFromPalette(const CRGBPalette16 &pal, uint8_t index, uint8_t brightness, TBlendType blendType)
Get a color from a palette.
LIB8STATIC uint16_t scale16(uint16_t i, fract16 scale)
Scale a 16-bit unsigned value by an 16-bit value, which is treated as the numerator of a fraction who...
#define sin16
Platform-independent alias of the fast sin implementation.
static FASTLED_NAMESPACE_BEGIN uint8_t const p[]
Representation of an RGB pixel (Red, Green, Blue)