2019-06-05 04:27:07 +00:00
|
|
|
#pragma once
|
2019-05-29 22:49:54 +00:00
|
|
|
#include "Effect.h"
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
class SingleDynamicEffect : public Effect {
|
2019-06-07 04:24:16 +00:00
|
|
|
protected:
|
2019-05-29 22:49:54 +00:00
|
|
|
static const int factor = 2;
|
|
|
|
static const int tile_count = LED_WIDTH/factor * LED_HEIGHT/factor;
|
|
|
|
CRGB tiles[tile_count];
|
|
|
|
CRGB old_tiles[tile_count];
|
|
|
|
uint8_t blend = 0;
|
2019-06-07 04:24:16 +00:00
|
|
|
public:
|
2019-05-29 22:49:54 +00:00
|
|
|
SingleDynamicEffect();
|
2019-06-03 04:43:50 +00:00
|
|
|
void init();
|
2019-05-29 22:49:54 +00:00
|
|
|
boolean can_be_shown_with_clock();
|
2019-10-01 04:29:32 +00:00
|
|
|
virtual void loop(uint16_t ms);
|
2019-06-05 04:27:07 +00:00
|
|
|
void draw();
|
2019-09-25 16:11:03 +00:00
|
|
|
String get_name() override { return "single_dynamic"; }
|
2019-06-05 04:27:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class MultiDynamicEffect : public SingleDynamicEffect {
|
2019-06-07 04:24:16 +00:00
|
|
|
public:
|
2019-10-01 04:29:32 +00:00
|
|
|
void loop(uint16_t ms);
|
2019-09-25 16:11:03 +00:00
|
|
|
String get_name() override { return "multi_dynamic"; }
|
2019-05-29 22:49:54 +00:00
|
|
|
};
|
2019-06-19 20:29:11 +00:00
|
|
|
|
|
|
|
class BigDynamicEffect : public Effect {
|
|
|
|
private:
|
|
|
|
Window* window = new Window(0, 0, LED_WIDTH, LED_HEIGHT-6);
|
|
|
|
public:
|
2019-10-01 04:29:32 +00:00
|
|
|
void loop(uint16_t ms);
|
2019-06-19 20:29:11 +00:00
|
|
|
~BigDynamicEffect();
|
2019-09-25 04:28:53 +00:00
|
|
|
boolean can_be_shown_with_clock() override;
|
2019-09-25 16:11:03 +00:00
|
|
|
String get_name() override { return "big_dynamic"; }
|
2019-06-19 20:29:11 +00:00
|
|
|
};
|