Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
actuators.h
Go to the documentation of this file.
1 /*
2  * Original Code from:
3  * Copyright (C) 2011 Hugo Perquin - http://blog.perquin.com
4  *
5  * Adapated for Paparazzi by:
6  * Copyright (C) 2012 Dino Hensen <dino.hensen@gmail.com>
7  *
8  * This file is part of paparazzi.
9  *
10  * paparazzi is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2, or (at your option)
13  * any later version.
14  *
15  * paparazzi is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with paparazzi; see the file COPYING. If not, write to
22  * the Free Software Foundation, 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, USA.
24  */
25 
31 #ifndef ACTUATORS_ARDRONE2_H_
32 #define ACTUATORS_ARDRONE2_H_
33 
34 #include <stdint.h>
35 
36 #ifndef ACTUATORS_ARDRONE_NB
37 #define ACTUATORS_ARDRONE_NB 4
38 #endif
39 
40 #define SERVOS_TICS_OF_USEC(_v) (_v)
41 
42 #define ActuatorArdroneSet(_i, _v) { actuators_pwm_values[_i] = _v; }
43 #define ActuatorsArdroneCommit() actuators_ardrone_commit();
44 #define ActuatorsArdroneInit() actuators_ardrone_init();
45 
46 #define MOT_LEDOFF 0
47 #define MOT_LEDRED 1
48 #define MOT_LEDGREEN 2
49 #define MOT_LEDORANGE 3
50 
52 
53 extern void actuators_ardrone_commit(void);
54 extern void actuators_ardrone_init(void);
55 
56 
57 int actuators_ardrone_cmd(uint8_t cmd, uint8_t *reply, int replylen);
58 void actuators_ardrone_set_pwm(uint16_t pwm0, uint16_t pwm1, uint16_t pwm2, uint16_t pwm3);
59 void actuators_ardrone_set_leds(uint8_t led0, uint8_t led1, uint8_t led2, uint8_t led3);
60 void actuators_ardrone_close(void);
61 
62 #endif /* ACTUATORS_ARDRONE2_H_ */
void actuators_ardrone_close(void)
Definition: actuators.c:272
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)
Definition: actuators.c:255
void actuators_ardrone_commit(void)
Definition: actuators.c:221
uint16_t actuators_pwm_values[ACTUATORS_ARDRONE_NB]
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: actuators.c:232
#define ACTUATORS_ARDRONE_NB
Definition: actuators.h:37
void actuators_ardrone_init(void)
Definition: actuators.c:82
int actuators_ardrone_cmd(uint8_t cmd, uint8_t *reply, int replylen)
Definition: actuators.c:159
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98