Initial Commit
This commit is contained in:
36
include/CycleLight.h
Normal file
36
include/CycleLight.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user