MCPcopy Create free account
hub / github.com/FastLED/FastLED / draw

Method draw

src/fl/fx/2d/wave.h:341–348  ·  view source on GitHub ↗

@brief Render wave to LED array @param context Draw context containing timestamp and LED buffer Updates the wave simulation (if auto-update enabled) and maps wave values to LED colors using the current color mapper.

Source from the content-addressed store, hash-verified

339 /// Updates the wave simulation (if auto-update enabled) and
340 /// maps wave values to LED colors using the current color mapper.
341 void draw(DrawContext context) override {
342 // Update the wave simulation.
343 if (mAutoUpdates) {
344 mWaveSim.update();
345 }
346 // Map the wave values to the LEDs.
347 mCrgbMap->mapWaveToLEDs(mXyMap, mWaveSim, context.leds);
348 }
349
350 /// @brief Enable/disable automatic simulation updates
351 /// @param autoUpdate If true, simulation advances each draw() call

Callers

nothing calls this directly

Calls 2

updateMethod · 0.45
mapWaveToLEDsMethod · 0.45

Tested by

no test coverage detected