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 32 of file wave.h.

32 {
33 const uint32_t width = waveSim.getWidth();
34 const uint32_t height = waveSim.getHeight();
35 for (uint32_t y = 0; y < height; y++) {
36 for (uint32_t x = 0; x < width; x++) {
37 uint32_t idx = xymap(x, y);
38 uint8_t value8 = waveSim.getu8(x, y);
39 leds[idx] = CRGB(value8, value8, value8);
40 }
41 }
42 }
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81
WaveSimulation1D waveSim(NUM_LEDS, SuperSample::SUPER_SAMPLE_2X)

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