RSeries astromech firmware
PWMDecoder Class Reference

#include <encoder/PWMDecoder.h>

+ Inheritance diagram for PWMDecoder:
+ Collaboration diagram for PWMDecoder:

Public Member Functions

 PWMDecoder (void(*changeNotify)(int pin, uint16_t pwm), int pin1, int pin2=-1, int pin3=-1, int pin4=-1)
 
 PWMDecoder (int pin1, int pin2=-1, int pin3=-1, int pin4=-1)
 
uint16_t channel (unsigned i=0) const
 
uint16_t getValue (unsigned i=0) const
 
bool hasChanged (unsigned i=0)
 
unsigned numChannels () const
 
unsigned long getAge (unsigned i=0)
 
bool isActive (unsigned i=0)
 
bool becameActive (unsigned i=0)
 
bool becameInactive (unsigned i=0)
 
virtual void animate () override
 Subclasses must implement this function to run through a single frame of animation/activity. More...
 
void begin ()
 
void end ()
 
- Public Member Functions inherited from AnimatedEvent
 AnimatedEvent ()
 Default Constructor. More...
 
void setLoopDoneCallback (AnimatedLoopDone loopProc)
 

Public Attributes

bool fStarted = false
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ PWMDecoder() [1/2]

PWMDecoder::PWMDecoder ( void(*)(int pin, uint16_t pwm)  changeNotify,
int  pin1,
int  pin2 = -1,
int  pin3 = -1,
int  pin4 = -1 
)
inline

◆ PWMDecoder() [2/2]

PWMDecoder::PWMDecoder ( int  pin1,
int  pin2 = -1,
int  pin3 = -1,
int  pin4 = -1 
)
inline

Member Function Documentation

◆ animate()

virtual void PWMDecoder::animate ( )
inlineoverridevirtual

Subclasses must implement this function to run through a single frame of animation/activity.

Subclasses should not call delay() or otherwise block.

Implements AnimatedEvent.

◆ becameActive()

bool PWMDecoder::becameActive ( unsigned  i = 0)
inline

◆ becameInactive()

bool PWMDecoder::becameInactive ( unsigned  i = 0)
inline

◆ begin()

void PWMDecoder::begin ( )
inline

◆ channel()

uint16_t PWMDecoder::channel ( unsigned  i = 0) const
inline

◆ end()

void PWMDecoder::end ( )
inline

◆ getAge()

unsigned long PWMDecoder::getAge ( unsigned  i = 0)
inline

◆ getValue()

uint16_t PWMDecoder::getValue ( unsigned  i = 0) const
inline

◆ hasChanged()

bool PWMDecoder::hasChanged ( unsigned  i = 0)
inline

◆ isActive()

bool PWMDecoder::isActive ( unsigned  i = 0)
inline

◆ numChannels()

unsigned PWMDecoder::numChannels ( ) const
inline

Member Data Documentation

◆ fStarted

bool PWMDecoder::fStarted = false

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