RSeries astromech firmware
ServoDecoder Class Reference

#include <encoder/ServoDecoder.h>

+ Inheritance diagram for ServoDecoder:
+ Collaboration diagram for ServoDecoder:

Public Member Functions

 ServoDecoder (void(*changeNotify)(int pin, uint16_t pwm), byte pin)
 
virtual void setup () override
 Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor. More...
 
virtual void animate () override
 Subclasses must implement this function to run through a single frame of animation/activity. More...
 
bool begin (bool measurePulseHigh=true)
 
bool hasChanged ()
 
unsigned int getValue ()
 
unsigned long getAge ()
 
bool isActive ()
 
bool becameActive ()
 
bool becameInactive ()
 
void end ()
 
- Public Member Functions inherited from SetupEvent
 SetupEvent ()
 Default Constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SetupEvent
static void ready ()
 Calls setup() for each created AnimatedEvent subclass. More...
 

Constructor & Destructor Documentation

◆ ServoDecoder()

ServoDecoder::ServoDecoder ( void(*)(int pin, uint16_t pwm)  changeNotify,
byte  pin 
)
inline

Member Function Documentation

◆ animate()

virtual void ServoDecoder::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 ServoDecoder::becameActive ( )
inline

◆ becameInactive()

bool ServoDecoder::becameInactive ( )
inline

◆ begin()

bool ServoDecoder::begin ( bool  measurePulseHigh = true)
inline

◆ end()

void ServoDecoder::end ( )
inline

◆ getAge()

unsigned long ServoDecoder::getAge ( )
inline

◆ getValue()

unsigned int ServoDecoder::getValue ( )
inline

◆ hasChanged()

bool ServoDecoder::hasChanged ( )
inline

◆ isActive()

bool ServoDecoder::isActive ( )
inline

◆ setup()

virtual void ServoDecoder::setup ( )
inlineoverridevirtual

Subclasses must implement this function to perform any necessary setup that cannot happen in the constructor.

Implements SetupEvent.


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