Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
actuators_heli.c
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Copyright (C) 2010 The Paparazzi Team
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
25 #include "actuators_heli.h"
27 
28 /* let's start butchery now and use the actuators_pwm arch functions */
30 
31 /* get SetActuatorsFromCommands() macro */
32 #include "generated/airframe.h"
33 
34 /* define the glue between control and SetActuatorsFromCommands */
35 #define actuators actuators_pwm_values
36 #define SERVOS_TICS_OF_USEC(_v) (_v)
37 #define ESC_STOPPED SERVOS_TICS_OF_USEC(0)
38 
39 #ifndef KILL_MOTORS
40 #define ESC_HOVER SERVOS_TICS_OF_USEC(5500)
41 #else
42 #define ESC_HOVER SERVOS_TICS_OF_USEC(0)
43 #endif
44 
45 #define Actuator(_x) actuators_pwm_values[_x]
46 #ifndef ChopServo
47 #define ChopServo(x,a,b) Chop(x, a, b)
48 #endif
49 #define ActuatorsCommit actuators_pwm_commit
50 
52 
54 
55 
56 void actuators_set(bool_t motors_on) {
57 
58  SetActuatorsFromCommands(commands);
59 
60 }
61 
void actuators_set(bool_t motors_on)
void actuators_pwm_arch_init(void)
signed long int32_t
Definition: types.h:19
pprz_t commands[COMMANDS_NB]
Definition: commands.c:42
void actuators_init(void)
int32_t actuators_pwm_values[ACTUATORS_PWM_NB]
#define ACTUATORS_PWM_NB