This massively improves glitches in functions like sin(t + sin(t)), as
used in the RgbwPsychedelicAnimation. That animation is now almost
flicker-free.
It’s an extension to the previous RgbwSinusAnimation and tilts and
moves the sine waves differently for each color band. Additive color
mixing generates very interesting patterns.
The ESP’s IP stack seems not to support UDP packet fragmentation and
drops such packets silently which is problematic for setups with many
LEDs and huge updates.
With this patch, the UDP server processes up to 3 full UDP packets per
frame, allowing much larger updates. Additionally, the new END_OF_UPDATE
flag allows to signal when a update sequence is finished. If this flag
is encountered, no further UDP packets are processed in the current
frame.
The ACK request packet contains a sequence number which is echoed back
to the client in a simple UDP packet. By evaluating the difference
between sent and received sequence number, the client can control how
much data is buffered on the way to the ESP.
This framework provides the same animation interface as the ESP
firmware, but sends commands to the ESP via UDP. Therefore animations
can be tested without re-flashing the firmware for every tiny tuning
change.
To accomplish this, the following changes were made:
- Added an image-scrolling animation
- Implemented a bitmap font engine to generate an image from text
- On startup, an image-scrolling animation is set up with an image
generated from the local IP address
Now any access to the flash, either through update writing or SPIFFS
access, is blocked while the LED stripes are written. This is
accomplished using a FreeRTOS semaphore.
- stop() animation before changing state and wait for completion
- additionally fade to black (in case animation does not stop at black
or when UDP stream ends)
- reset() the animation when changing back to the animation state