Library to control NeoPixel strings of RGB leds
Dependents: NeoPixelI2cSlave NeoPixelI2cSlave
Diff: Effects/effect.h
- Revision:
- 3:7d32f46a38d3
- Parent:
- 1:f544810b6598
diff -r bb9ebad05691 -r 7d32f46a38d3 Effects/effect.h --- a/Effects/effect.h Mon Nov 23 21:32:24 2015 +0000 +++ b/Effects/effect.h Fri Apr 15 14:38:13 2016 +0000 @@ -8,24 +8,21 @@ private: NeoPixelString * pixelstring; - int delay_ms; - Ticker ticker; - bool execute_effect; + neopixel::Pixel color; + bool doExecute; public: - Effect(NeoPixelString * pixelstring, int delay_ms); - - public: - NeoPixelString * getPixelString(void); - void start(void); - void stop(void); - bool needsExecutionTime(void); + Effect(NeoPixelString * pixelstring, neopixel::Pixel color); public: - virtual void execute(void); - - private: - void tick(void); + virtual void start(void); + virtual void stop(void); + NeoPixelString * getPixelString(void); + neopixel::Pixel getColor(void); + void requestExecute(void); + void clearExecute(void); + bool shouldExecute(void); + virtual void execute(void) = 0; }; }; \ No newline at end of file