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

Function triggerRipple

examples/Wave/Wave.h:48–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void triggerRipple(fl::WaveSimulation1D &waveSim, int x) {
49
50 for (int i = x - 1; i <= x + 1; i++) {
51 if (i < 0 || i >= NUM_LEDS)
52 continue;
53 waveSim.setf(i, -1.f);
54 }
55}
56
57// Wave simulation looks better when you render at a higher resolution then
58// downscale the result to the display resolution.

Callers 1

loopFunction · 0.70

Calls 1

setfMethod · 0.45

Tested by

no test coverage detected