| 421 | |
| 422 | |
| 423 | void wavefx_loop() { |
| 424 | // The main program loop that runs continuously |
| 425 | |
| 426 | // Get the current time in milliseconds |
| 427 | uint32_t now = fl::millis(); |
| 428 | |
| 429 | // set the x cyclical |
| 430 | waveFxLower.setXCylindrical(xCyclical.value()); // Set whether lower wave wraps around x-axis |
| 431 | |
| 432 | // Apply all UI settings and get button states |
| 433 | ui_state state = ui(); |
| 434 | |
| 435 | // Check if the regular ripple button was pressed |
| 436 | if (state.button) { |
| 437 | triggerRipple(); // Create a single ripple |
| 438 | } |
| 439 | |
| 440 | // Apply the fancy cross effect if its button is pressed |
| 441 | applyFancyEffect(now, state.bigButton); |
| 442 | |
| 443 | // Handle automatic triggering of ripples |
| 444 | processAutoTrigger(now); |
| 445 | |
| 446 | // Create a drawing context with the current time and LED fl::array |
| 447 | fl::Fx::DrawContext ctx(now, leds); |
| 448 | |
| 449 | // Draw the blended result of both wave layers to the LED fl::array |
| 450 | fxBlend.draw(ctx); |
| 451 | |
| 452 | // Send the color data to the actual LEDs |
| 453 | FastLED.show(); |
| 454 | } |
| 455 | |
| 456 | |
| 457 | #endif // SKETCH_HAS_LARGE_MEMORY |
nothing calls this directly
no test coverage detected