pitrix/include/effects/animation.h

25 lines
708 B
C
Raw Normal View History

#pragma once
#include "Effect.h"
#include "prototypes.h"
#include "my_fastled.h"
#include "Animation.h"
class AnimationEffect : public Effect {
2019-06-07 04:24:16 +00:00
private:
Animation *animation;
const char* name;
uint16_t xOffset;
uint16_t yOffset;
unsigned long _last_blink_at;
uint16_t _blink_freq;
2019-06-07 04:24:16 +00:00
public:
AnimationEffect(const char* name, uint32_t bg_color=0x000000, int x=0, int y=0);
static AnimationEffect* Blinker(const char* name, uint16_t interval, uint32_t color, uint32_t background_color=0x000000);
~AnimationEffect();
AnimationEffect* setFgColor(uint32_t c);
AnimationEffect* setBlinkFrequency(uint16_t);
void loop(uint16_t ms);
String get_name() override;
};