Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
actuators.h File Reference

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

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

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 = 011rrrr0 000gggg0 (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.h.

Macro Definition Documentation

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

Definition at line 42 of file actuators.h.

#define ACTUATORS_ARDRONE_NB   4

Definition at line 37 of file actuators.h.

#define ActuatorsArdroneCommit ( )    actuators_ardrone_commit();

Definition at line 43 of file actuators.h.

#define ActuatorsArdroneInit ( )    actuators_ardrone_init();

Definition at line 44 of file actuators.h.

#define MOT_LEDGREEN   2

Definition at line 48 of file actuators.h.

Referenced by actuators_ardrone_init().

#define MOT_LEDOFF   0

Definition at line 46 of file actuators.h.

#define MOT_LEDORANGE   3

Definition at line 49 of file actuators.h.

#define MOT_LEDRED   1

Definition at line 47 of file actuators.h.

Referenced by actuators_ardrone_init().

#define SERVOS_TICS_OF_USEC (   _v)    (_v)

Definition at line 40 of file actuators.h.

Function Documentation

void actuators_ardrone_close ( void  )

Definition at line 271 of file actuators.c.

References actuator_ardrone2_fd.

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

Definition at line 158 of file actuators.c.

References actuator_ardrone2_fd, full_read(), and full_write().

Referenced by actuators_ardrone_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void actuators_ardrone_commit ( void  )

Definition at line 220 of file actuators.c.

References actuators_ardrone_motor_status(), actuators_ardrone_set_pwm(), and actuators_pwm_values.

+ 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 = 011rrrr0 000gggg0 (this is ardrone1 format, we need ardrone2 format)

led0 = RearLeft led1 = RearRight led2 = FrontRight led3 = FrontLeft

Definition at line 254 of file actuators.c.

References actuator_ardrone2_fd, and full_write().

Referenced by actuators_ardrone_init(), and actuators_ardrone_led_run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 231 of file actuators.c.

References actuator_ardrone2_fd, actuators_ardrone_led_run(), and full_write().

Referenced by actuators_ardrone_commit().

+ Here is the call graph for this function:

+ 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.h.