2019-05-29 22:49:54 +00:00
|
|
|
#ifndef effect_matrix_H
|
|
|
|
#define effect_matrix_H
|
|
|
|
|
|
|
|
#include "prototypes.h"
|
|
|
|
#include "Effect.h"
|
|
|
|
#include "config.h"
|
|
|
|
#include "my_fastled.h"
|
2019-06-04 03:55:24 +00:00
|
|
|
#include "my_color_palettes.h"
|
2019-05-29 22:49:54 +00:00
|
|
|
|
|
|
|
class MatrixEffectColumn {
|
2019-06-07 04:24:16 +00:00
|
|
|
private:
|
2019-05-29 22:49:54 +00:00
|
|
|
int x, y;
|
|
|
|
int length;
|
|
|
|
Window* window;
|
2019-05-30 09:26:13 +00:00
|
|
|
uint16_t speed;
|
2019-05-29 22:49:54 +00:00
|
|
|
boolean running;
|
2019-05-30 09:26:13 +00:00
|
|
|
unsigned long last_move = 0;
|
2019-06-07 04:24:16 +00:00
|
|
|
public:
|
2019-05-29 22:49:54 +00:00
|
|
|
MatrixEffectColumn();
|
|
|
|
MatrixEffectColumn(Window* win, int xPos);
|
|
|
|
|
|
|
|
void start();
|
|
|
|
|
|
|
|
void advance();
|
|
|
|
|
|
|
|
void draw();
|
|
|
|
|
|
|
|
void loop();
|
|
|
|
};
|
|
|
|
|
|
|
|
class MatrixEffect : public Effect {
|
2019-06-07 04:24:16 +00:00
|
|
|
private:
|
2019-05-29 22:49:54 +00:00
|
|
|
MatrixEffectColumn columns[LED_WIDTH];
|
2019-06-07 04:24:16 +00:00
|
|
|
public:
|
2019-05-29 22:49:54 +00:00
|
|
|
boolean can_be_shown_with_clock();
|
|
|
|
MatrixEffect();
|
|
|
|
void loop();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|