JBWOPR
Loading...
Searching...
No Matches
JBWoprDefconRainbowEffect Class Reference

Rainbow effect for the DEFCON LED's. More...

#include <jbwopreffects.h>

Inheritance diagram for JBWoprDefconRainbowEffect:
JBWoprEffectBase

Public Member Functions

 JBWoprDefconRainbowEffect (JBWoprDevice *woprBoard, uint32_t duration=-1, const std::string &name=JBWOPR_EFFECT_NAME_DEFCON_RAINBOW)
 Constructor.
 
void loop () override
 Run loop.
 
- Public Member Functions inherited from JBWoprEffectBase
 JBWoprEffectBase (JBWoprDevice *woprDevice, uint32_t duration=-1, std::string name=JBWOPR_EFFECT_NAME_BASE)
 Constructor.
 
virtual std::string getName ()
 Get name of effect.
 
virtual void start ()
 Start effect.
 
virtual void stop ()
 Stop effect.
 
bool isRunning () const
 Check if effect is running.
 
uint32_t getDuration () const
 Set duration of effect.
 

Additional Inherited Members

- Protected Member Functions inherited from JBWoprEffectBase
void _displayText (const std::string &text, JBTextAlignment alignment=JBTextAlignment::LEFT)
 Display text on raw display.
 
- Protected Attributes inherited from JBWoprEffectBase
JBWoprDevice_woprDevice
 JBWoprDevice instance.
 
std::string _name
 Name of effect.
 
bool _isRunning = false
 True if effect is running.
 
bool _done = true
 True if effect is done, waiting for duration to end.
 
uint32_t _duration = -1
 Duration of effect in milliseconds.
 
uint32_t _startTime = 0
 Start time of effect in milliseconds.
 
uint32_t _nextTick = 0
 Next tick time in milliseconds.
 

Detailed Description

Rainbow effect for the DEFCON LED's.

Constructor & Destructor Documentation

◆ JBWoprDefconRainbowEffect()

JBWoprDefconRainbowEffect::JBWoprDefconRainbowEffect ( JBWoprDevice woprBoard,
uint32_t  duration = -1,
const std::string &  name = JBWOPR_EFFECT_NAME_DEFCON_RAINBOW 
)
explicit

Constructor.

Parameters
woprBoardJBWoprDevice instance
durationDuration of effect (after it is done) in milliseconds, default is -1 (infinite)
nameName of effect, default is JBWOPR_EFFECT_NAME_DEFCON_RAINBOW

Member Function Documentation

◆ loop()

void JBWoprDefconRainbowEffect::loop ( )
overridevirtual

Run loop.

Reimplemented from JBWoprEffectBase.


The documentation for this class was generated from the following files: