Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
actuators.h File Reference

Actuator driver for the bebop. More...

#include <stdint.h>
#include "mcu_periph/i2c.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  ActuatorsBebop

Macros

#define ACTUATORS_BEBOP_ADDR   0x10
#define ACTUATORS_BEBOP_SET_REF_SPEED   0x02
 Set reference speed.
#define ACTUATORS_BEBOP_GET_OBS_DATA   0x20
 Get observation data.
#define ACTUATORS_BEBOP_START_PROP   0x40
 Start the propellers.
#define ACTUATORS_BEBOP_TOGGLE_GPIO   0x4D
 Toggle GPIO (reset, red led, green led).
#define ACTUATORS_BEBOP_STOP_PROP   0x60
 Stop the propellers.
#define ACTUATORS_BEBOP_CLEAR_ERROR   0x80
 Clear all current erros.
#define ACTUATORS_BEBOP_PLAY_SOUND   0x82
 Play a sound (0=stop, 1=short beep, 2=boot beep, 3=Be-Bop-Ah-Lula, negative=repeat).
#define ACTUATORS_BEBOP_GET_INFO   0xA0
 Get version information.
#define ActuatorsBebopSet   actuators_bebop_set
#define ActuatorsBebopCommit()
#define ActuatorsBebopInit()

Functions

void actuators_bebop_commit (void)
void actuators_bebop_init (void)
void actuators_bebop_set (uint8_t idx, int16_t val)

Variables

struct ActuatorsBebop actuators_bebop

Detailed Description

Actuator driver for the bebop.

Definition in file actuators.h.


Data Structure Documentation

◆ ActuatorsBebop

struct ActuatorsBebop

Definition at line 48 of file actuators.h.

Collaboration diagram for ActuatorsBebop:
Data Fields
struct i2c_transaction i2c_trans I2C transaction for communicating with the bebop BLDC driver.
uint8_t led Current led status.
uint16_t rpm_obs[4] Observed RPM.
uint16_t rpm_ref[4] Reference RPM.

Macro Definition Documentation

◆ ACTUATORS_BEBOP_ADDR

#define ACTUATORS_BEBOP_ADDR   0x10

Definition at line 35 of file actuators.h.

Referenced by actuators_bebop_init().

◆ ACTUATORS_BEBOP_CLEAR_ERROR

#define ACTUATORS_BEBOP_CLEAR_ERROR   0x80

Clear all current erros.

Definition at line 43 of file actuators.h.

Referenced by actuators_bebop_commit().

◆ ACTUATORS_BEBOP_GET_INFO

#define ACTUATORS_BEBOP_GET_INFO   0xA0

Get version information.

Definition at line 45 of file actuators.h.

◆ ACTUATORS_BEBOP_GET_OBS_DATA

#define ACTUATORS_BEBOP_GET_OBS_DATA   0x20

Get observation data.

Definition at line 39 of file actuators.h.

Referenced by actuators_bebop_commit().

◆ ACTUATORS_BEBOP_PLAY_SOUND

#define ACTUATORS_BEBOP_PLAY_SOUND   0x82

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

Definition at line 44 of file actuators.h.

◆ ACTUATORS_BEBOP_SET_REF_SPEED

#define ACTUATORS_BEBOP_SET_REF_SPEED   0x02

Set reference speed.

Definition at line 38 of file actuators.h.

Referenced by actuators_bebop_commit().

◆ ACTUATORS_BEBOP_START_PROP

#define ACTUATORS_BEBOP_START_PROP   0x40

Start the propellers.

Definition at line 40 of file actuators.h.

Referenced by actuators_bebop_commit().

◆ ACTUATORS_BEBOP_STOP_PROP

#define ACTUATORS_BEBOP_STOP_PROP   0x60

Stop the propellers.

Definition at line 42 of file actuators.h.

Referenced by actuators_bebop_commit().

◆ ACTUATORS_BEBOP_TOGGLE_GPIO

#define ACTUATORS_BEBOP_TOGGLE_GPIO   0x4D

Toggle GPIO (reset, red led, green led).

Definition at line 41 of file actuators.h.

Referenced by actuators_bebop_commit().

◆ ActuatorsBebopCommit

#define ActuatorsBebopCommit ( )
Value:
void actuators_bebop_commit(void)
Definition actuators.c:92

Definition at line 56 of file actuators.h.

◆ ActuatorsBebopInit

#define ActuatorsBebopInit ( )
Value:
void actuators_bebop_init(void)
Definition actuators.c:75

Definition at line 57 of file actuators.h.

◆ ActuatorsBebopSet

#define ActuatorsBebopSet   actuators_bebop_set

Definition at line 55 of file actuators.h.

Function Documentation

◆ actuators_bebop_commit()

◆ actuators_bebop_init()

void actuators_bebop_init ( void )
extern

Definition at line 75 of file actuators.c.

References actuators_bebop, ACTUATORS_BEBOP_ADDR, DefaultPeriodic, I2CTransDone, register_periodic_telemetry(), and send_bebop_actuators().

Here is the call graph for this function:

◆ actuators_bebop_set()

void actuators_bebop_set ( uint8_t idx,
int16_t val )
extern

Definition at line 87 of file actuators.c.

References actuators_bebop, and idx.

Variable Documentation

◆ actuators_bebop