Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

LedMC Class Reference

This is just a simple wrapper - you probably want to be looking at LedEngine. More...

#include <LedMC.h>

Inheritance diagram for LedMC:

Detailed Description

This is just a simple wrapper - you probably want to be looking at LedEngine.

This is handy if all you want to do is control the LED's, but since other MotionCommands will probably also want to make use of the LEDs, they can just use the engine component to do all the work.

Definition at line 19 of file LedMC.h.

List of all members.

Public Member Functions

 LedMC ()
 constructor
virtual ~LedMC ()
 destructor
virtual void doStart ()
 Override this if you want to run some startup code after being added to the MotionManager.
void setDirty ()
virtual int updateOutputs ()
 updates the cmds from LedEngine::updateLEDs()
virtual int isDirty ()
 returns true if there are changes since the last updateLEDs()
virtual int isAlive ()
 used to prune "dead" motions from the MotionManager
void setWeights (LEDBitMask_t leds, float weight)
 Sets the JointCmd::weight of the LEDs specified by leds to weight.

Protected Attributes

OutputCmd cmds [NumLEDs][NumFrames]
 needed to store weight values of LEDs (useful to mark LEDs as unused)
bool notified
 set to true when we've posted a status event for completion of a flash/cflash

Constructor & Destructor Documentation

LedMC::LedMC (  ) 

constructor

Definition at line 22 of file LedMC.h.

virtual LedMC::~LedMC (  )  [virtual]

destructor

Definition at line 29 of file LedMC.h.


Member Function Documentation

virtual void LedMC::doStart (  )  [virtual]

Override this if you want to run some startup code after being added to the MotionManager.

Reimplemented from MotionCommand.

Definition at line 31 of file LedMC.h.

virtual int LedMC::isAlive (  )  [virtual]

used to prune "dead" motions from the MotionManager

note that a motion could be "paused" or inactive and therefore not dirty, but still alive, biding its time to "strike" ;)

Returns:
zero if the motion is still processing, non-zero otherwise

Implements MotionCommand.

Definition at line 57 of file LedMC.h.

virtual int LedMC::isDirty (  )  [virtual]

returns true if there are changes since the last updateLEDs()

Reimplemented from LedEngine.

Definition at line 55 of file LedMC.h.

Referenced by isAlive().

void LedMC::setDirty (  ) 

Definition at line 36 of file LedMC.h.

void LedMC::setWeights ( LEDBitMask_t  leds,
float  weight 
)

Sets the JointCmd::weight of the LEDs specified by leds to weight.

Definition at line 61 of file LedMC.h.

Referenced by LedMC().

virtual int LedMC::updateOutputs (  )  [virtual]

updates the cmds from LedEngine::updateLEDs()

Implements MotionCommand.

Definition at line 39 of file LedMC.h.


Member Data Documentation

OutputCmd LedMC::cmds[NumLEDs][NumFrames] [protected]

needed to store weight values of LEDs (useful to mark LEDs as unused)

Definition at line 70 of file LedMC.h.

Referenced by setWeights(), and updateOutputs().

bool LedMC::notified [protected]

set to true when we've posted a status event for completion of a flash/cflash

Definition at line 71 of file LedMC.h.

Referenced by updateOutputs().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:12 2016 by Doxygen 1.6.3