Encapsulates the concept of a servo motor. More...
#include <servo.hpp>
Public Types | |
typedef unsigned int | ticks_t |
Public Member Functions | |
Servo (port_t port) | |
void | setPosition (ticks_t position) |
ticks_t | position () const |
void | disable () |
void | enable () |
void | setEnabled (const bool &enabled) |
bool | isEnabled () const |
Encapsulates the concept of a servo motor.
typedef unsigned int Servo::ticks_t |
Servo::Servo | ( | port_t | port | ) |
Create a new servo object.
port | The associated physical servo port |
void Servo::disable | ( | ) |
void Servo::enable | ( | ) |
bool Servo::isEnabled | ( | ) | const |
ticks_t Servo::position | ( | ) | const |
void Servo::setEnabled | ( | const bool & | enabled | ) |
void Servo::setPosition | ( | ticks_t | position | ) |
position | The new servo position, between 0 and 1024 |