27 #ifndef ACTUATORS_FAULHABER_H
28 #define ACTUATORS_FAULHABER_H
63 #define ACTUATORS_FAULHABER_COMMAND_SCALE 1000.0f
66 #define ActuatorsFaulhaberInit() {}
67 #define ActuatorFaulhaberSet(_i, _v) {}
68 #define ActuatorsFaulhaberCommit() {}
70 #define ActuatorsFaulhaberInit() actuators_faulhaber_init()
71 #define ActuatorFaulhaberSet(_i, _v) { faulhaber.setpoint_position = ((get_servo_max_FAULHABER(0)-_v) + get_servo_min_FAULHABER(0))*ACTUATORS_FAULHABER_COMMAND_SCALE; }
72 #define ActuatorsFaulhaberCommit() {}
float p_gain
The proportional gain of the velocity controller.
int32_t max_velocity
The maximum velocity of the controller.
int32_t real_position
The real position from the feedback of the controller.
void actuators_faulhaber_event(void)
bool target_reached
When the target position is reached.
struct faulhaber_t faulhaber
enum faulhaber_modes_t mode
Current mode of the controller.
bool homing_completed
Once the homing is completed.
int32_t setpoint_position
The setpoint position controlled from the actuator.
int32_t target_velocity
The target velocity send to the controller.
uint8_t state
The state of the mode.
bool position_ready
Ready for receiving (new) positions.
void actuators_faulhaber_periodic(void)
void actuators_faulhaber_init(void)
void actuators_faulhaber_SetMode(uint8_t mode)
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.