This commit is contained in:
2021-03-28 14:50:31 -07:00
parent cadfd40b61
commit 92d5e73bd8
9 changed files with 141 additions and 96 deletions

View File

@ -1,9 +1,11 @@
#include "../Figments/Figments.h"
using CRGB = NSFastLED::CRGB;
template<int Period>
class ColorSequenceInput: public InputSource {
public:
ColorSequenceInput(const std::vector<NSFastLED::CRGB> &colors, const char* name, Task::State initialState)
ColorSequenceInput(const std::vector<CRGB> &colors, const char* name, Task::State initialState)
: InputSource(name, initialState), m_colors(colors) {}
InputEvent read() override {
@ -32,7 +34,7 @@ public:
}
private:
std::vector<NSFastLED::CRGB> m_colors;
std::vector<CRGB> m_colors;
int m_idx = 0;
bool m_reset = true;
bool m_override = false;