RSeries astromech firmware
ServoFeedback< NUM_SERVOS > Class Template Reference

#include <ServoFeedback.h>

Detailed Description

template<uint8_t NUM_SERVOS>
class ServoFeedback< NUM_SERVOS >

Provides an interface to read analog feedback from a set of servos.

Implements ServoFeedback reads servo feedback from a given set of analog pins.

+ Inheritance diagram for ServoFeedback< NUM_SERVOS >:
+ Collaboration diagram for ServoFeedback< NUM_SERVOS >:

Public Member Functions

 ServoFeedback (const uint8_t *analogPins)
 
uint8_t numServos () const
 
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...
 
uint8_t getRaw (uint8_t servoNum)
 
uint8_t getDegrees (uint8_t servoNum)
 
- 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

◆ ServoFeedback()

template<uint8_t NUM_SERVOS>
ServoFeedback< NUM_SERVOS >::ServoFeedback ( const uint8_t *  analogPins)
inline

Member Function Documentation

◆ animate()

template<uint8_t NUM_SERVOS>
virtual void ServoFeedback< NUM_SERVOS >::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.

◆ getDegrees()

template<uint8_t NUM_SERVOS>
uint8_t ServoFeedback< NUM_SERVOS >::getDegrees ( uint8_t  servoNum)
inline

◆ getRaw()

template<uint8_t NUM_SERVOS>
uint8_t ServoFeedback< NUM_SERVOS >::getRaw ( uint8_t  servoNum)
inline

◆ numServos()

template<uint8_t NUM_SERVOS>
uint8_t ServoFeedback< NUM_SERVOS >::numServos ( ) const
inline

◆ setup()

template<uint8_t NUM_SERVOS>
virtual void ServoFeedback< NUM_SERVOS >::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: