36 lines
876 B
C++
36 lines
876 B
C++
#ifndef CYCLELIGHT_H
|
|
#define CYCLELIGHT_H
|
|
|
|
#include "Animation.h"
|
|
#include "GlobalSettings.h"
|
|
#include "Utilities.h"
|
|
|
|
class CycleLight : public Animation {
|
|
public:
|
|
CycleLight(long _updateTime, CRGB* _colors, uint8_t _numColors) :
|
|
Animation(_updateTime, 3 * _numColors), colors(new CRGB[_numColors]),
|
|
numColors(_numColors), cycleLightInt(0), cycleLightColor(0) {
|
|
for(uint8_t i = 0; i < _numColors; i++) {
|
|
colors[i] = _colors[i];
|
|
}
|
|
}
|
|
|
|
void initialize(CRGB* leds) {
|
|
cycleLightInt = 0;
|
|
cycleLightColor = 0;
|
|
|
|
resetTimer();
|
|
}
|
|
|
|
void execute(CRGB* leds);
|
|
private:
|
|
uint16_t
|
|
cycleLightInt,
|
|
cycleLightColor;
|
|
CRGB*
|
|
colors;
|
|
uint8_t
|
|
numColors;
|
|
};
|
|
|
|
#endif |