#include <Actuator.h>
|
static double | convert_range (uint16_t input, float range_max=100.f, float range_min=0.f) |
| Convert uint16 to a new range. More...
|
|
Definition at line 14 of file Actuator.h.
◆ Actuator()
Actuator object, used by the movement module for vehicle movement.
Define possible axis this Actuator can move in.
- Parameters
-
axis | axis_mask_t possible containing multiple axis |
Definition at line 12 of file Actuator.cpp.
◆ ~Actuator()
◆ _set()
virtual err_t aruna::movement::Actuator::_set |
( |
axis_mask_t |
axisMask, |
|
|
int16_t |
speed |
|
) |
| |
|
privatepure virtual |
◆ convert_range()
double Actuator::convert_range |
( |
uint16_t |
input, |
|
|
float |
range_max = 100.f , |
|
|
float |
range_min = 0.f |
|
) |
| |
|
staticprotected |
Convert uint16 to a new range.
- Parameters
-
input | input to convert |
range_max | maximum range (default is 100) |
range_min | minimum range (default is 0) |
- Returns
- output of convertion
Definition at line 46 of file Actuator.cpp.
48 return ((input * (range_max - range_min)) / 65535) + range_min;
◆ get_axis()
get the movement modes that this driver supports.
- Returns
- movement_mode mask ORed.
Definition at line 16 of file Actuator.cpp.
◆ get_speed()
uint16_t Actuator::get_speed |
( |
| ) |
|
◆ set()
Set the speed of the motors directly.
- Parameters
-
axisMask,multiple | axis to apply speed to. |
speed,speed | of the motors |
- Returns
- err_t::OK if the command was succesfull, others when it fails.
Definition at line 20 of file Actuator.cpp.
virtual err_t _set(axis_mask_t axisMask, int16_t speed)=0
Implementation of axis movement, this function is called from set(...).
◆ set_axis()
Set the axis that this Actuator is capable in moving in.
- Parameters
-
new_axis | axis_mask_t possible containing multible axis |
- Returns
- always err_t::OK
Definition at line 40 of file Actuator.cpp.
◆ axis
◆ speed
int16_t aruna::movement::Actuator::speed = 0 |
|
private |
◆ startup_error
error when constructing gets put here, read before usage.
Definition at line 45 of file Actuator.h.
The documentation for this class was generated from the following files: