Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
Go to the source code of this file.
Data Structures | |
struct | faulhaber_t |
Macros | |
#define | ACTUATORS_FAULHABER_COMMAND_SCALE 1000.0f |
#define | ActuatorsFaulhaberInit() actuators_faulhaber_init() |
#define | ActuatorFaulhaberSet(_i, _v) { faulhaber.setpoint_position = ((get_servo_max_FAULHABER(0)-_v) + get_servo_min_FAULHABER(0))*ACTUATORS_FAULHABER_COMMAND_SCALE; } |
#define | ActuatorsFaulhaberCommit() {} |
Enumerations | |
enum | faulhaber_modes_t { FH_MODE_INIT , FH_MODE_VELOCITY , FH_MODE_ERROR , FH_MODE_REQ_ERR , FH_MODE_RESET_ERR } |
Functions | |
void | actuators_faulhaber_init (void) |
void | actuators_faulhaber_periodic (void) |
void | actuators_faulhaber_event (void) |
void | actuators_faulhaber_SetMode (uint8_t mode) |
Variables | |
struct faulhaber_t | faulhaber |
Definition in file actuators_faulhaber.h.
struct faulhaber_t |
Definition at line 40 of file actuators_faulhaber.h.
Data Fields | ||
---|---|---|
bool | homing_completed | Once the homing is completed. |
int32_t | max_velocity | The maximum velocity of the controller. |
enum faulhaber_modes_t | mode | Current mode of the controller. |
float | p_gain | The proportional gain of the velocity controller. |
bool | position_ready | Ready for receiving (new) positions. |
int32_t | real_position | The real position from the feedback of the controller. |
int32_t | setpoint_position | The setpoint position controlled from the actuator. |
uint8_t | state | The state of the mode. |
bool | target_reached | When the target position is reached. |
int32_t | target_velocity | The target velocity send to the controller. |
#define ActuatorFaulhaberSet | ( | _i, | |
_v | |||
) | { faulhaber.setpoint_position = ((get_servo_max_FAULHABER(0)-_v) + get_servo_min_FAULHABER(0))*ACTUATORS_FAULHABER_COMMAND_SCALE; } |
Definition at line 71 of file actuators_faulhaber.h.
#define ACTUATORS_FAULHABER_COMMAND_SCALE 1000.0f |
Definition at line 63 of file actuators_faulhaber.h.
#define ActuatorsFaulhaberCommit | ( | ) | {} |
Definition at line 72 of file actuators_faulhaber.h.
#define ActuatorsFaulhaberInit | ( | ) | actuators_faulhaber_init() |
Definition at line 70 of file actuators_faulhaber.h.
enum faulhaber_modes_t |
Enumerator | |
---|---|
FH_MODE_INIT | |
FH_MODE_VELOCITY | |
FH_MODE_ERROR | |
FH_MODE_REQ_ERR | |
FH_MODE_RESET_ERR |
Definition at line 32 of file actuators_faulhaber.h.
void actuators_faulhaber_event | ( | void | ) |
Definition at line 457 of file actuators_faulhaber.c.
References faulhaber_dev, faulhaber_p, faulhaber_parse_msg(), faulhaber_parser(), GOT_FULL_PACKET, faulhaber_parser_t::state, uart_char_available(), uart_getch(), and UINIT.
void actuators_faulhaber_init | ( | void | ) |
Definition at line 167 of file actuators_faulhaber.c.
References faulhaber, FAULHABER_MAX_VELOCITY, faulhaber_p, FAULHABER_P_GAIN, FH_MODE_INIT, faulhaber_t::homing_completed, faulhaber_t::max_velocity, faulhaber_t::mode, faulhaber_t::p_gain, faulhaber_t::position_ready, faulhaber_t::real_position, faulhaber_t::setpoint_position, faulhaber_parser_t::state, faulhaber_t::state, faulhaber_t::target_reached, and UINIT.
void actuators_faulhaber_periodic | ( | void | ) |
Definition at line 182 of file actuators_faulhaber.c.
References faulhaber, faulhaber_dev, faulhaber_send_command(), FH_MODE_ERROR, FH_MODE_INIT, FH_MODE_REQ_ERR, FH_MODE_RESET_ERR, FH_MODE_VELOCITY, get_sys_time_float(), faulhaber_t::homing_completed, last_time, faulhaber_t::max_velocity, faulhaber_t::mode, faulhaber_t::p_gain, faulhaber_t::real_position, faulhaber_t::setpoint_position, faulhaber_t::state, and faulhaber_t::target_velocity.
void actuators_faulhaber_SetMode | ( | uint8_t | mode | ) |
Definition at line 468 of file actuators_faulhaber.c.
References faulhaber, faulhaber_t::mode, mode, and faulhaber_t::state.
|
extern |
Definition at line 45 of file actuators_faulhaber.c.
Referenced by actuators_faulhaber_init(), actuators_faulhaber_periodic(), actuators_faulhaber_SetMode(), and faulhaber_parse_msg().