Class hal::soft::rc_servo
ClassList > hal > soft > rc_servo
Generic RC servo driver.
#include <rc_servo.hpp>
Inherits the following classes: hal::servo
Classes
Type | Name |
---|---|
struct | settings Information about the RC servo needed to control it properly. |
Public Functions inherited from hal::servo
See hal::servo
Type | Name |
---|---|
result< position_t > | position (hal::degrees p_position) Set the position of the servo's output shaft. |
virtual | ~servo () = default |
Public Static Functions
Type | Name |
---|---|
result< rc_servo > | create (hal::pwm & p_pwm, settings p_settings) Factory function to create a rc_servo object. |
Public Static Functions Documentation
function create
Factory function to create a rc_servo object.
static result< rc_servo > hal::soft::rc_servo::create (
hal::pwm & p_pwm,
settings p_settings
)
Compile time error will occur if the min microseconds is more than the max microseconds, if the max microseconds is more than the frequency wavelength, or if the min angle is more than max angle.
Parameters:
p_pwm
- pwm signal connected to the RC servop_settings
-
Returns:
result<rc_servo> - Constructed rc_servo object
The documentation for this class was generated from the following file libraries/include/libhal-soft/rc_servo.hpp