#include <ActuatorSet.h>
Definition at line 13 of file ActuatorSet.h.
◆ ActuatorSet()
aruna::movement::ActuatorSet::ActuatorSet |
( |
transform_t * |
transform, |
|
|
size_t |
transform_size |
|
) |
| |
put diffrent drivers in a driver set to allow them to cooperate and transform into a different axis when turned on together
- Parameters
-
transform | array of transform_t |
transform_size | size of array |
Definition at line 13 of file ActuatorSet.cpp.
const size_t transform_size
err_t set_axis(axis_mask_t new_axis)
Set the axis that this Actuator is capable in moving in.
Actuator(axis_mask_t axis=axis_mask_t::NONE)
Actuator object, used by the movement module for vehicle movement.
axis_mask_t compute_axis()
Get alle the axis from all inside the set and put them together.
err_t startup_error
error when constructing gets put here, read before usage.
◆ _set()
err_t aruna::movement::ActuatorSet::_set |
( |
axis_mask_t |
axisMask, |
|
|
int16_t |
speed |
|
) |
| |
|
overrideprivatevirtual |
Implementation of axis movement, this function is called from set(...)
.
Only gets called when axisMask match axis of Actuator.
- Parameters
-
axisMask | axis (can be multiple) to set speed to. |
speed | desired speed. |
- Returns
- err_t::OK if successful, others when not...
Implements aruna::movement::Actuator.
Definition at line 20 of file ActuatorSet.cpp.
22 err_t last_failure = err;
24 if ((uint8_t)
transform[i].transform_to & (uint8_t) axisMask) {
25 int32_t adjusted_speed = ((float)
speed * (
transform[i].speed_percentage / (
float) 100.0));
27 adjusted_speed = fmax(adjusted_speed, INT16_MIN);
28 adjusted_speed = fmin(adjusted_speed, INT16_MAX);
33 log.
verbose(
"setting driver: %i, axis: 0x%X, speed:%i", i, axisMask,
speed);
static aruna::log::channel_t log
err_t set(axis_mask_t axisMask, int16_t speed)
Set the speed of the motors directly.
const size_t transform_size
int verbose(const char *format,...)
log verbose message
◆ compute_axis()
axis_mask_t aruna::movement::ActuatorSet::compute_axis |
( |
| ) |
|
|
private |
Get alle the axis from all inside the set and put them together.
- Returns
- axis mask of all actuators in the set.
Definition at line 43 of file ActuatorSet.cpp.
const size_t transform_size
Link * driver
stores the driver.
◆ err_check()
err_t aruna::movement::ActuatorSet::err_check |
( |
| ) |
|
|
private |
Definition at line 53 of file ActuatorSet.cpp.
55 err_t last_failure = err;
const size_t transform_size
err_t startup_error
error when constructing gets put here, read before usage.
◆ log
◆ transform
◆ transform_size
const size_t aruna::movement::ActuatorSet::transform_size |
|
private |
The documentation for this class was generated from the following files: