Joined SingleDynamicEffect and MultiDynamicEffect into one file and finally got different timings for both classes to work.

This commit is contained in:
2019-06-05 06:27:07 +02:00
parent b2ff3bdc54
commit 57815cb3bf
6 changed files with 50 additions and 73 deletions

View File

@ -1,6 +1,4 @@
#ifndef effect_single_dynamic_H
#define effect_single_dynamic_H
#pragma once
#include "Effect.h"
#include "config.h"
@ -8,15 +6,18 @@ class SingleDynamicEffect : public Effect {
protected:
static const int factor = 2;
static const int tile_count = LED_WIDTH/factor * LED_HEIGHT/factor;
int loopTime = 200;
CRGB tiles[tile_count];
CRGB old_tiles[tile_count];
uint8_t blend = 0;
public:
SingleDynamicEffect();
void init();
virtual void update();
boolean can_be_shown_with_clock();
virtual void loop();
void draw();
};
class MultiDynamicEffect : public SingleDynamicEffect {
public:
void loop();
};
#endif

View File

@ -1,12 +0,0 @@
#ifndef effect_multi_dynamic_H
#define effect_multi_dynamic_H
#include "effect_single_dynamic.h"
class MultiDynamicEffect : public SingleDynamicEffect {
public:
MultiDynamicEffect();
void update();
};
#endif