Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
rc_datalink.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2014 The Paparazzi Team
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
27 #ifndef RC_DATALINK_H
28 #define RC_DATALINK_H
29 
30 #include "std.h"
31 
32 #define RC_DL_NB_CHANNEL 11
33 
38 #define RADIO_ROLL 0 // Default: Roll
39 #define RADIO_PITCH 1 // Default: Pitch
40 #define RADIO_YAW 2 // Default: Yaw
41 #define RADIO_THROTTLE 3 // Default: Thrust
42 #define RADIO_MODE 4 // Default: MODE (MANUAL / AUTO)
43 #define RADIO_AUX1 5 // Default: KILL
44 #define RADIO_AUX2 7 // Default: NA
45 #define RADIO_AUX4 8 // Default: NA
46 #define RADIO_AUX5 9 // Default: NA
47 #define RADIO_AUX6 10 // Default: NA
48 #define RADIO_AUX7 6 // Default: AP_MODE (EXTRA MODE SWITCH: e.g Switch NAV from INDI to ANDI to PID)
49 
50 #ifndef RADIO_KILL_SWITCH
51 #define RADIO_KILL_SWITCH RADIO_AUX1
52 #endif
53 
54 #ifndef AP_MODE_SWITCH
55 #define AP_MODE_SWITCH RADIO_AUX7
56 #endif
57 
59 extern volatile bool rc_dl_frame_available;
60 
64 extern void parse_rc_up_datalink(
65  int8_t n, int8_t *channels);
66 
67 extern void rc_datalink_parse_RC_UP(uint8_t *buf);
71 extern void rc_datalink_init(void);
72 
76 extern void rc_datalink_event(void);
77 
78 #endif /* RC_DATALINK_H */
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98
signed char int8_t
Typedef defining 8 bit char type.
Definition: vl53l1_types.h:103