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