G.U.L.L.S. rebuilt to use PlatformIO
This commit is contained in:
47
include/CycleLightMatrix.h
Normal file
47
include/CycleLightMatrix.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef CYCLELIGHTMATRIX_H
|
||||
#define CYCLELIGHTMATRIX_H
|
||||
|
||||
#include "MatrixAnimation.h"
|
||||
|
||||
enum CycleLightType {
|
||||
HORIZONTAL_CYCLELIGHT,
|
||||
VERTICAL_CYCLELIGHT
|
||||
};
|
||||
|
||||
class CycleLightMatrix : public MatrixAnimation {
|
||||
public:
|
||||
CycleLightMatrix(LEDHAL2D* _matrix, char* _refName, long _updateTime, CRGB* _colors,
|
||||
uint8_t _numColors, CycleLightType _type) : MatrixAnimation(_matrix, _refName,
|
||||
_updateTime), numColors(_numColors), colors(new CRGB[_numColors]),
|
||||
cycleLightInt(0), cycleLightColor(0), type(_type) {
|
||||
for(uint8_t i = 0; i < _numColors; i++) {
|
||||
colors[i] = _colors[i];
|
||||
}
|
||||
}
|
||||
virtual ~CycleLightMatrix() { delete colors; }
|
||||
|
||||
void initialize() {
|
||||
cycleLightInt = 0;
|
||||
cycleLightColor = 0;
|
||||
resetTimer();
|
||||
}
|
||||
|
||||
void execute();
|
||||
|
||||
CycleLightType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
private:
|
||||
uint16_t
|
||||
cycleLightInt,
|
||||
cycleLightColor;
|
||||
CRGB*
|
||||
colors;
|
||||
uint8_t
|
||||
numColors;
|
||||
CycleLightType
|
||||
type;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user