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.c File Reference

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

#include "subsystems/actuators.h"
#include "actuators_ardrone2_raw.h"
#include "gpio_ardrone.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <termios.h>
#include <stdint.h>
+ Include dependency graph for actuators_ardrone2_raw.c:

Go to the source code of this file.

Functions

void actuators_ardrone_init (void)
 
int actuators_ardrone_cmd (uint8_t cmd, uint8_t *reply, int replylen)
 
void actuators_ardrone_commit (void)
 
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

int mot_fd
 Power consumption @ 11V all 4 motors running PWM A 0 0.2 80 1.3 100 1.5 150 2.0 190 2.5 130 3.0. More...
 

Detailed Description

Actuator driver for ardrone2-raw version.

Definition in file actuators_ardrone2_raw.c.

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

int mot_fd

Power consumption @ 11V all 4 motors running PWM A 0 0.2 80 1.3 100 1.5 150 2.0 190 2.5 130 3.0.

File descriptor for the port

Definition at line 53 of file actuators_ardrone2_raw.c.

Referenced by actuators_ardrone_close(), actuators_ardrone_cmd(), actuators_ardrone_init(), actuators_ardrone_set_leds(), and actuators_ardrone_set_pwm().