![]() |
HitLib 1.5.0
VEX V5 LED animation library for PROS
|
A hand-drawn pixel strip: x = pixel, y = frame. More...
#include <led_strand.hpp>
Public Attributes | |
| const uint8_t * | data |
| const uint16_t * | index |
Byte offset of each frame in data. | |
| const uint32_t * | palette |
| Index 0 is transparent whatever color it names. | |
| uint8_t | paletteCount |
| uint8_t | width |
| Pixels per frame. | |
| uint8_t | count |
| Frames. | |
| uint16_t | frameMs |
| How long each frame holds. | |
| const uint8_t * | scroll |
| One flag per frame: non-zero scrolls that frame. | |
A hand-drawn pixel strip: x = pixel, y = frame.
Each frame is run-length coded, one byte per run: the top three bits are the run length minus one (1-8 pixels) and the bottom five a palette index (0-31). Palette index 0 is transparent, so a drawn shape lets the layers below through around it. Identical frames share an offset in index, so a two-frame blink costs two runs and four index entries.
width is the frame's own width, not the layer's span, so a frame wider than the span can be scrolled through it. A decoder clamps a run to whatever width is left, so a hand-edited table cannot overrun.
Each frame either holds still, showing exactly what was drawn, or scrolls at the layer's LayerMotion speed, as scroll says. A run of scrolling frames is one continuous scroll; a frame that holds puts the drawing back where it was drawn, and a scrolling frame after it starts from there.
| const uint8_t* hitlib::LedStrand::LayerFrames::data |
| const uint16_t* hitlib::LedStrand::LayerFrames::index |
Byte offset of each frame in data.
| const uint32_t* hitlib::LedStrand::LayerFrames::palette |
Index 0 is transparent whatever color it names.
| uint8_t hitlib::LedStrand::LayerFrames::paletteCount |
| uint8_t hitlib::LedStrand::LayerFrames::width |
Pixels per frame.
| uint8_t hitlib::LedStrand::LayerFrames::count |
Frames.
| uint16_t hitlib::LedStrand::LayerFrames::frameMs |
How long each frame holds.
| const uint8_t* hitlib::LedStrand::LayerFrames::scroll |
One flag per frame: non-zero scrolls that frame.
nullptr holds every frame still.