1 #ifndef FASTLED_ANIMATION_H
2 #define FASTLED_ANIMATION_H
9 uint8_t ledCount; // Number of LEDs in the strip (max 254)
10 uint16_t frameCount; // Number of frames in this animation (max 65535)
11 prog_uint8_t* frameData; // Pointer to the begining of the frame data
13 uint16_t frameIndex; // Current animation frame
14 prog_uint8_t* currentFrameData; // Pointer to the current position in the frame data
16 uint8_t colorTableEntries; // Number of entries in the color table, minus 1 (max 255)
17 struct CRGB* colorTable; // Pointer to color table, if used by the encoder
19 void drawIndexed_RLE(struct CRGB strip[]);
22 // Initialize the animation with no data. This is intended for the case
23 // where the animation will be re-initialized from a memory structure in ROM
24 // after the sketch starts.
27 // Initialize the animation
28 // @param frameCount Number of frames in this animation
29 // @param frameData Pointer to the frame data. Format of this data is indexed RLE
30 // @param ledCount Number of LEDs in the strip
31 Animation(uint16_t frameCount,
32 const prog_uint8_t* frameData,
33 const uint8_t ledCount);
35 // Re-initialize the animation with new information
36 // @param frameCount Number of frames in this animation
37 // @param frameData Pointer to the frame data. Format of this data is indexed RLE
38 // @param ledCount Number of LEDs in the strip
39 void init(uint16_t frameCount,
40 const prog_uint8_t* frameData,
41 const uint8_t ledCount);
43 // Reset the animation, causing it to start over from frame 0.
46 // Draw the next frame of the animation
47 // @param strip[] LED strip to draw to.
48 void draw(struct CRGB strip[]);
51 #endif // FASTLED_ANIMATION_H