Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
actuators_faulhaber.h File Reference
#include "std.h"
+ Include dependency graph for actuators_faulhaber.h:
+ This graph shows which files directly or indirectly include this file:

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
 

Detailed Description

Author
Freek van Tienen Serial Connection module between ap and a faulhaber motor controller

Definition in file actuators_faulhaber.h.


Data Structure Documentation

◆ faulhaber_t

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.

Macro Definition Documentation

◆ ActuatorFaulhaberSet

#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.

◆ ACTUATORS_FAULHABER_COMMAND_SCALE

#define ACTUATORS_FAULHABER_COMMAND_SCALE   1000.0f

Definition at line 63 of file actuators_faulhaber.h.

◆ ActuatorsFaulhaberCommit

#define ActuatorsFaulhaberCommit ( )    {}

Definition at line 72 of file actuators_faulhaber.h.

◆ ActuatorsFaulhaberInit

#define ActuatorsFaulhaberInit ( )    actuators_faulhaber_init()

Definition at line 70 of file actuators_faulhaber.h.

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ actuators_faulhaber_event()

void actuators_faulhaber_event ( void  )

◆ actuators_faulhaber_init()

◆ actuators_faulhaber_periodic()

◆ actuators_faulhaber_SetMode()

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.

Variable Documentation

◆ faulhaber