Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
actuators_ardrone2_raw.h File Reference

Actuator driver for ardrone2-raw version. More...

#include <stdint.h>
+ Include dependency graph for actuators_ardrone2_raw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ACTUATORS_ARDRONE_NB   4
 
#define SERVOS_TICS_OF_USEC(_v)   (_v)
 
#define ActuatorArdroneSet(_i, _v)   { actuators_pwm_values[_i] = _v; }
 
#define ActuatorsArdroneCommit()   actuators_ardrone_commit();
 
#define ActuatorsArdroneInit()   actuators_ardrone_init();
 
#define MOT_LEDOFF   0
 
#define MOT_LEDRED   1
 
#define MOT_LEDGREEN   2
 
#define MOT_LEDORANGE   3
 

Functions

void actuators_ardrone_commit (void)
 
void actuators_ardrone_init (void)
 
int actuators_ardrone_cmd (uint8_t cmd, uint8_t *reply, int replylen)
 
void actuators_ardrone_set_pwm (uint16_t pwm0, uint16_t pwm1, uint16_t pwm2, uint16_t pwm3)
 Write motor speed command cmd = 001aaaaa aaaabbbb bbbbbccc ccccccdd ddddddd0. More...
 
void actuators_ardrone_set_leds (uint8_t led0, uint8_t led1, uint8_t led2, uint8_t led3)
 Write LED command cmd = 011grgrg rgrxxxxx (this is ardrone1 format, we need ardrone2 format) More...
 
void actuators_ardrone_close (void)
 

Variables

uint16_t actuators_pwm_values [ACTUATORS_ARDRONE_NB]
 

Detailed Description

Actuator driver for ardrone2-raw version.

Definition in file actuators_ardrone2_raw.h.

Macro Definition Documentation

#define ActuatorArdroneSet (   _i,
  _v 
)    { actuators_pwm_values[_i] = _v; }

Definition at line 42 of file actuators_ardrone2_raw.h.

#define ACTUATORS_ARDRONE_NB   4

Definition at line 37 of file actuators_ardrone2_raw.h.

#define ActuatorsArdroneCommit ( )    actuators_ardrone_commit();

Definition at line 43 of file actuators_ardrone2_raw.h.

#define ActuatorsArdroneInit ( )    actuators_ardrone_init();

Definition at line 44 of file actuators_ardrone2_raw.h.

#define MOT_LEDGREEN   2

Definition at line 48 of file actuators_ardrone2_raw.h.

#define MOT_LEDOFF   0

Definition at line 46 of file actuators_ardrone2_raw.h.

#define MOT_LEDORANGE   3

Definition at line 49 of file actuators_ardrone2_raw.h.

#define MOT_LEDRED   1

Definition at line 47 of file actuators_ardrone2_raw.h.

#define SERVOS_TICS_OF_USEC (   _v)    (_v)

Definition at line 40 of file actuators_ardrone2_raw.h.

Function Documentation

void actuators_ardrone_close ( void  )

Definition at line 166 of file actuators_ardrone2_raw.c.

References mot_fd.

int actuators_ardrone_cmd ( uint8_t  cmd,
uint8_t reply,
int  replylen 
)

Definition at line 129 of file actuators_ardrone2_raw.c.

References mot_fd.

Referenced by actuators_ardrone_init().

+ Here is the caller graph for this function:

void actuators_ardrone_commit ( void  )

Definition at line 134 of file actuators_ardrone2_raw.c.

References actuators_ardrone_set_pwm(), and actuators_pwm_values.

+ Here is the call graph for this function:

void actuators_ardrone_init ( void  )

Definition at line 55 of file actuators_ardrone2_raw.c.

References actuators_ardrone_cmd(), B115200, gpio_set(), and mot_fd.

+ Here is the call graph for this function:

void actuators_ardrone_set_leds ( uint8_t  led0,
uint8_t  led1,
uint8_t  led2,
uint8_t  led3 
)

Write LED command cmd = 011grgrg rgrxxxxx (this is ardrone1 format, we need ardrone2 format)

Definition at line 158 of file actuators_ardrone2_raw.c.

References mot_fd.

void actuators_ardrone_set_pwm ( uint16_t  pwm0,
uint16_t  pwm1,
uint16_t  pwm2,
uint16_t  pwm3 
)

Write motor speed command cmd = 001aaaaa aaaabbbb bbbbbccc ccccccdd ddddddd0.

Definition at line 143 of file actuators_ardrone2_raw.c.

References mot_fd.

Referenced by actuators_ardrone_commit().

+ Here is the caller graph for this function:

Variable Documentation

uint16_t actuators_pwm_values[ACTUATORS_ARDRONE_NB]

Definition at line 51 of file actuators_ardrone2_raw.h.