#include <Servo.hpp>
|
| | Servo (int port) |
| | Create a servo bound to a platform-defined port index.
|
| | ~Servo () |
| void | setPosition (float position) |
| | Command a new servo position in degrees (0-180).
|
| float | getPosition () const |
| | Return the last commanded position in degrees.
|
| void | setSmoothPosition (float targetDeg, float speedDegPerSec, int easing) |
| | Command a smooth move to targetDeg at the given speed; interpolation runs in the C++ reader.
|
| void | enable () const |
| | Enable output while preserving the last commanded position.
|
| void | disable () const |
| | Disable output while preserving the last commanded position.
|
|
| static void | fullyDisableAll () |
| | Force every servo into the platform's fully disabled state.
|
Servo output wrapper implemented by the active platform bundle.
The wrapper caches the last commanded position locally so callers can query getPosition() even when the underlying driver is write-only.
Definition at line 13 of file Servo.hpp.
◆ Servo()
| libstp::hal::servo::Servo::Servo |
( |
int | port | ) |
|
|
explicit |
Create a servo bound to a platform-defined port index.
◆ ~Servo()
| libstp::hal::servo::Servo::~Servo |
( |
| ) |
|
◆ disable()
| void libstp::hal::servo::Servo::disable |
( |
| ) |
const |
Disable output while preserving the last commanded position.
◆ enable()
| void libstp::hal::servo::Servo::enable |
( |
| ) |
const |
Enable output while preserving the last commanded position.
◆ fullyDisableAll()
| void libstp::hal::servo::Servo::fullyDisableAll |
( |
| ) |
|
|
static |
Force every servo into the platform's fully disabled state.
◆ getPosition()
| float libstp::hal::servo::Servo::getPosition |
( |
| ) |
const |
Return the last commanded position in degrees.
◆ setPosition()
| void libstp::hal::servo::Servo::setPosition |
( |
float | position | ) |
|
Command a new servo position in degrees (0-180).
◆ setSmoothPosition()
| void libstp::hal::servo::Servo::setSmoothPosition |
( |
float | targetDeg, |
|
|
float | speedDegPerSec, |
|
|
int | easing ) |
Command a smooth move to targetDeg at the given speed; interpolation runs in the C++ reader.
◆ port
| int libstp::hal::servo::Servo::port |
The documentation for this class was generated from the following file:
- /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-hal/include/hal/Servo.hpp