8 #ifndef COMPONENTS_ESPECTRO32_SRC_ESPECTRO32_LEDMATRIX_ANIMATION_H_
9 #define COMPONENTS_ESPECTRO32_SRC_ESPECTRO32_LEDMATRIX_ANIMATION_H_
12 #include "ESPectro32_LedMatrix.h"
14 #define ESPECTRO32_LEDMATRIX_MAX_FRAME_COUNT 8
31 typedef std::function<void(ESPectro32_LedMatrix &ledMatrix)> FrameDataCallback;
44 void onAnimationCompleted(Animator::AnimationFinishedCallback cb) {
45 animCompletedCb_ = cb;
48 void addFrameWithData(uint8_t *data, uint16_t color = 255);
49 void addFrameWithDataCallback(ESPectro32_LedMatrix_Animation::FrameDataCallback cb);
50 void setFrameWithData(uint8_t frameNo, uint8_t *data, uint16_t color = 255);
51 void setFrameWithDataCallback(uint8_t frameNo, ESPectro32_LedMatrix_Animation::FrameDataCallback cb);
53 void start(Animator::AnimationUpdateCallback animUpdateCallback, Animator::AnimationFinishedCallback animFinishedCallback,
54 uint16_t duration = 0, uint16_t updateInterval = 0);
55 void start(uint16_t duration = 0,
bool repeat =
false);
61 uint8_t frameCount_ = 0;
62 bool forceStop_ =
false;
64 Animator::AnimationFinishedCallback animCompletedCb_ = NULL;
74 void scrollText(
const char *text, uint16_t duration = 0,
bool repeat =
false);
76 char *scrolledText_ = NULL;
Base class of Led Matrix animation.
Definition: ESPectro32_LedMatrix_Animation.h:28
Definition: ESPectro32_LedMatrix_Animation.h:69
The class represents Led Matrix.
Definition: ESPectro32_LedMatrix.h:76
Definition: Animator.h:15