RSeries astromech firmware
MagicPanelBase Class Reference

#include <dome/MagicPanel.h>

Detailed Description

Base class for Magic Panel.

The MagicPanelBase implements the functionality of the magic panel and depends on the LedControl instance to drive the actual LEDs. There are two instances of LedControlMAX7221 and LedControlNeoPixelGrid

+ Inheritance diagram for MagicPanelBase:
+ Collaboration diagram for MagicPanelBase:

Public Types

enum  EffectValue { kNormalVal = 0 }
 
enum  Sequence {
  kNormal = 0, kSolid = 1, kToggle = 2, kFlash = 3,
  kAlert = 4, kHorizontalScan = 5, kVerticalScan = 6, kLife = 7,
  kExpandSolid = 8, kCollapseSolid = 9, kExpandHollow = 10, kCollapseHollow = 11,
  kForwardQ = 12, kReverseQ = 13, kCistercian = 14
}
 

Public Member Functions

 MagicPanelBase (LedControl &ledControl)
 Default Constructor. More...
 
virtual void setup () override
 Perform any initialzation not possible in the constructor. More...
 
void selectEffect (long inputNum)
 Select the specified effect using a 32-bit integer. More...
 
virtual void handleCommand (const char *cmd) override
 MP00000 - Normal MP10000 - Solid MP20000 - Toggle MP30000 - Flash MP40000 - Alert MP50000 - Horizontal Scan MP60000 - Vertical Scan MP70000 - Game of Life MP80000 - Expand Solid MP90000 - Collapse Solid MP100000 - Expand Hollow MP110000 - Collapse Hollow MP120000 - Forward Q MP130000 - Reverse Q MP140000 - Cistercian. More...
 
void setSequence (Sequence seq=kNormal, uint8_t speedScale=0, uint8_t numSeconds=0)
 Select the specified effect sequence. More...
 
virtual void animate () override
 Perform a single frame of LED animation based on the selected sequence. More...
 
- Public Member Functions inherited from AnimatedEvent
 AnimatedEvent ()
 Default Constructor. More...
 
void setLoopDoneCallback (AnimatedLoopDone loopProc)
 

Additional Inherited Members

- Static Public Member Functions inherited from AnimatedEvent
static void process ()
 Calls animate() for each created AnimatedEvent subclass. More...
 

Member Enumeration Documentation

◆ EffectValue

Enumerator
kNormalVal 

◆ Sequence

Enumerator
kNormal 
kSolid 
kToggle 
kFlash 
kAlert 
kHorizontalScan 
kVerticalScan 
kLife 
kExpandSolid 
kCollapseSolid 
kExpandHollow 
kCollapseHollow 
kForwardQ 
kReverseQ 
kCistercian 

Constructor & Destructor Documentation

◆ MagicPanelBase()

MagicPanelBase::MagicPanelBase ( LedControl &  ledControl)
inline

Default Constructor.

Member Function Documentation

◆ animate()

virtual void MagicPanelBase::animate ( )
inlineoverridevirtual

Perform a single frame of LED animation based on the selected sequence.

Implements AnimatedEvent.

◆ handleCommand()

virtual void MagicPanelBase::handleCommand ( const char *  cmd)
inlineoverridevirtual

MP00000 - Normal MP10000 - Solid MP20000 - Toggle MP30000 - Flash MP40000 - Alert MP50000 - Horizontal Scan MP60000 - Vertical Scan MP70000 - Game of Life MP80000 - Expand Solid MP90000 - Collapse Solid MP100000 - Expand Hollow MP110000 - Collapse Hollow MP120000 - Forward Q MP130000 - Reverse Q MP140000 - Cistercian.

Implements CommandEvent.

◆ selectEffect()

void MagicPanelBase::selectEffect ( long  inputNum)
inline

Select the specified effect using a 32-bit integer.

  • Sequence (0-99) * 10000
  • Speed (0-9) * 100
  • Duration (0-99)

◆ setSequence()

void MagicPanelBase::setSequence ( Sequence  seq = kNormal,
uint8_t  speedScale = 0,
uint8_t  numSeconds = 0 
)
inline

Select the specified effect sequence.

◆ setup()

virtual void MagicPanelBase::setup ( )
inlineoverridevirtual

Perform any initialzation not possible in the constructor.

Implements SetupEvent.


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