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
spektrum_arch.h
Go to the documentation of this file.
1 /*
2  * Paparazzi $Id$
3  *
4  * Copyright (C) 2010 Eric Parsonage <eric@eparsonage.com>
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  */
24 
25 #ifndef RADIO_CONTROL_SPEKTRUM_ARCH_H
26 #define RADIO_CONTROL_SPEKTRUM_ARCH_H
27 
28 
29 /*
30  * All Spektrum and JR 2.4 GHz transmitters
31  * have the same channel assignments.
32  */
33 
34 
35 #ifndef RADIO_CONTROL_NB_CHANNEL
36 #define RADIO_CONTROL_NB_CHANNEL 12
37 #endif
38 
39 
40 #define RADIO_THROTTLE 0
41 #define RADIO_ROLL 1
42 #define RADIO_PITCH 2
43 #define RADIO_YAW 3
44 #define RADIO_GEAR 4
45 #define RADIO_FLAP 5
46 #define RADIO_AUX1 5
47 #define RADIO_AUX2 6
48 #define RADIO_AUX3 7
49 #define RADIO_AUX4 8
50 #define RADIO_AUX5 9
51 #define RADIO_AUX6 10
52 #define RADIO_AUX7 11
53 
54 /* reverse some channels to suit Paparazzi conventions */
55 /* the maximum number of channels a Spektrum can transmit is 12 */
56 #ifndef RADIO_CONTROL_SPEKTRUM_SIGNS
57 #define RADIO_CONTROL_SPEKTRUM_SIGNS {1,-1,-1,-1,1,-1,1,1,1,1,1,1}
58 #endif
59 
60 /* really for a 9 channel transmitter
61  we would swap the order of these */
62 #ifndef RADIO_MODE
63 #define RADIO_MODE RADIO_GEAR
64 #endif
65 
66 extern void RadioControlEventImp(void (*_received_frame_handler)(void));
67 
68 #endif /* RADIO_CONTROL_SPEKTRUM_ARCH_H */
void RadioControlEventImp(void(*_received_frame_handler)(void))