G.U.L.L.S. rebuilt to use PlatformIO
This commit is contained in:
38
include/CycleLightStrip.h
Normal file
38
include/CycleLightStrip.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef CYCLELIGHTSTRIP_H
|
||||
#define CYCLELIGHTSTRIP_H
|
||||
|
||||
#include "StripAnimation.h"
|
||||
#include "LEDHAL.h"
|
||||
|
||||
class CycleLightStrip : public StripAnimation {
|
||||
public:
|
||||
CycleLightStrip(LEDHAL* _strip, char* _refName, long _updateTime, uint8_t _numColors,
|
||||
CRGB* _colors) : StripAnimation(_strip, _refName, _updateTime),
|
||||
numColors(_numColors), colors(new CRGB[_numColors]), cycleLightInt(0),
|
||||
cycleLightColor(0) {
|
||||
for(uint8_t i = 0; i < _numColors; i++) {
|
||||
colors[i] = _colors[i];
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~CycleLightStrip() { delete colors; }
|
||||
|
||||
void initialize() {
|
||||
cycleLightInt = 0;
|
||||
cycleLightColor = 0;
|
||||
resetTimer();
|
||||
}
|
||||
|
||||
void execute();
|
||||
|
||||
private:
|
||||
uint16_t
|
||||
cycleLightInt,
|
||||
cycleLightColor;
|
||||
CRGB*
|
||||
colors;
|
||||
uint8_t
|
||||
numColors;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user