FastLED 3.9.15
Loading...
Searching...
No Matches

◆ mapWaveToLEDs()

void fl::WaveCrgbMapDefault::mapWaveToLEDs ( const XYMap & xymap,
WaveSimulation2D & waveSim,
CRGB * leds )
inlineoverridevirtual

Implements fl::WaveCrgbMap.

Definition at line 34 of file wave.h.

35 {
36 const fl::u32 width = waveSim.getWidth();
37 const fl::u32 height = waveSim.getHeight();
38 for (fl::u32 y = 0; y < height; y++) {
39 for (fl::u32 x = 0; x < width; x++) {
40 fl::u32 idx = xymap(x, y);
41 uint8_t value8 = waveSim.getu8(x, y);
42 leds[idx] = CRGB(value8, value8, value8);
43 }
44 }
45 }
CRGB leds[NUM_LEDS]
int y
Definition simple.h:93
int x
Definition simple.h:92
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
WaveSimulation1D waveSim(NUM_LEDS, SuperSample::SUPER_SAMPLE_2X)

References leds, waveSim(), x, xymap, and y.

+ Here is the call graph for this function: