| 87 | } |
| 88 | |
| 89 | void loop() { |
| 90 | // Your code here |
| 91 | waveSim.setXCylindrical(xCyclical.value()); |
| 92 | waveSim.setSpeed(slider); |
| 93 | waveSim.setDampening(dampening); |
| 94 | waveSim.setHalfDuplex(halfDuplex); |
| 95 | waveSim.setSuperSample(getSuperSample()); |
| 96 | // Apply after setSuperSample() so the user's choice survives the |
| 97 | // wrapper's multiplier-based auto-select for the stencil. |
| 98 | waveSim.setStencil(isotropicStencil |
| 99 | ? fl::LaplacianStencil::NinePointIsotropic |
| 100 | : fl::LaplacianStencil::FivePoint); |
| 101 | if (button) { |
| 102 | triggerRipple(waveSim); |
| 103 | } |
| 104 | |
| 105 | |
| 106 | EVERY_N_MILLISECONDS(400) { |
| 107 | if (autoTrigger) { |
| 108 | triggerRipple(waveSim); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | waveSim.update(); |
| 113 | for (int y = 0; y < HEIGHT; y++) { |
| 114 | for (int x = 0; x < WIDTH; x++) { |
| 115 | uint8_t value8 = waveSim.getu8(x, y); |
| 116 | uint32_t idx = xyMap.mapToIndex(x, y); |
| 117 | leds[idx] = fl::CRGB(value8, value8, value8); |
| 118 | } |
| 119 | } |
| 120 | FastLED.show(); |
| 121 | } |
nothing calls this directly
no test coverage detected