Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
actuators.h File Reference

Actuator driver for the disco. More...

#include "std.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/pwm_sysfs.h"
+ Include dependency graph for actuators.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ActuatorsDisco


 Set reference speed. More...
 Get observation data. More...
 Start the propellers. More...
 Toggle GPIO (reset, red led, green led) More...
 Stop the propellers. More...
 Clear all current erros. More...
 Play a sound (0=stop, 1=short beep, 2=boot beep, 3=Be-Bop-Ah-Lula, negative=repeat) More...
 Get version information. More...
 Max number of PWM channels. More...
 Index for motor BLDC. More...
#define ActuatorsDiscoSet(_i, _v)   actuators_disco_set(_i, _v)
#define ActuatorsDiscoCommit()   actuators_disco_commit()
#define ActuatorsDiscoInit()   actuators_disco_init()


void actuators_disco_set (uint8_t idx, uint16_t val)
void actuators_disco_commit (void)
void actuators_disco_init (void)


struct ActuatorsDisco actuators_disco

Detailed Description

Actuator driver for the disco.

Disco plane is using the same ESC (I2C) than bebop for its motor and Pwm_sysfs linux driver for the PWM outputs

Definition in file actuators.h.

Data Structure Documentation

◆ ActuatorsDisco

struct ActuatorsDisco

Definition at line 54 of file actuators.h.

+ Collaboration diagram for ActuatorsDisco:
Data Fields
struct i2c_transaction i2c_trans I2C transaction for communicating with the Disco BLDC driver.
uint16_t motor_rpm Motor RPM setpoint.
struct PWM_Sysfs pwm[ACTUATORS_DISCO_PWM_NB] Array of PWM outputs.
uint16_t rpm_obs Measured RPM.
bool rpm_saturated RPM saturation flag (bit 15 in obs data)
uint8_t status Status flag.

Macro Definition Documentation



Definition at line 38 of file actuators.h.



Clear all current erros.

Definition at line 46 of file actuators.h.



Get version information.

Definition at line 48 of file actuators.h.



Get observation data.

Definition at line 42 of file actuators.h.



Index for motor BLDC.

Definition at line 52 of file actuators.h.



Play a sound (0=stop, 1=short beep, 2=boot beep, 3=Be-Bop-Ah-Lula, negative=repeat)

Definition at line 47 of file actuators.h.



Max number of PWM channels.

Definition at line 51 of file actuators.h.



Set reference speed.

Definition at line 41 of file actuators.h.



Start the propellers.

Definition at line 43 of file actuators.h.



Stop the propellers.

Definition at line 45 of file actuators.h.



Toggle GPIO (reset, red led, green led)

Definition at line 44 of file actuators.h.

◆ ActuatorsDiscoCommit

#define ActuatorsDiscoCommit ( )    actuators_disco_commit()

Definition at line 64 of file actuators.h.

◆ ActuatorsDiscoInit

#define ActuatorsDiscoInit ( )    actuators_disco_init()

Definition at line 65 of file actuators.h.

◆ ActuatorsDiscoSet

#define ActuatorsDiscoSet (   _i,
)    actuators_disco_set(_i, _v)

Definition at line 63 of file actuators.h.

Function Documentation

◆ actuators_disco_commit()

◆ actuators_disco_init()

◆ actuators_disco_set()

void actuators_disco_set ( uint8_t  idx,
uint16_t  val 

Definition at line 96 of file actuators.c.

References actuators_disco, ACTUATORS_DISCO_MOTOR_IDX, ACTUATORS_DISCO_PWM_NB, idx, ActuatorsDisco::motor_rpm, ActuatorsDisco::pwm, pwm_sysfs_set_duty(), and val.

+ Here is the call graph for this function:

Variable Documentation

◆ actuators_disco

struct ActuatorsDisco actuators_disco

Definition at line 69 of file actuators.c.

Referenced by actuators_disco_commit(), actuators_disco_init(), and actuators_disco_set().