Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
main_fbw.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 The Paparazzi Team
3  * Copyright (C) 2022 Gautier Hattenberger <gautier.hattenberger@enac.fr>
4  *
5  * This file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, see
19  * <http://www.gnu.org/licenses/>.
20  *
21  */
22 
38 #ifndef MAIN_FBW_H
39 #define MAIN_FBW_H
40 
44 #ifndef RC_LOST_FBW_MODE
45 #define RC_LOST_FBW_MODE FBW_MODE_AUTO
46 #endif
47 
49 #ifndef RC_LOST_IN_AUTO_FBW_MODE
50 #define RC_LOST_IN_AUTO_FBW_MODE FBW_MODE_AUTO
51 #endif
52 
54 #ifndef AP_LOST_FBW_MODE
55 #define AP_LOST_FBW_MODE FBW_MODE_FAILSAFE
56 #endif
57 
59 #ifndef FBW_MODE_AUTO_ONLY
60 #define FBW_MODE_AUTO_ONLY false
61 #endif
62 
64 #ifndef RADIO_FBW_MODE
65 #define RADIO_FBW_MODE RADIO_MODE
66 #endif
67 
68 #define FBW_MODE_MANUAL 0
69 #define FBW_MODE_AUTO 1
70 #define FBW_MODE_FAILSAFE 2
71 
72 #include "std.h"
73 
74 extern uint8_t fbw_mode;
75 extern bool fbw_motors_on;
76 
77 extern void main_fbw_init(void);
78 extern void main_fbw_event(void);
79 extern void main_fbw_periodic(void);
80 extern void main_fbw_parse_EMERGENCY_CMD(uint8_t *buf);
81 
82 #endif /* MAIN_FBW_H */
83 
void main_fbw_parse_EMERGENCY_CMD(uint8_t *buf)
Definition: main_fbw.c:256
void main_fbw_init(void)
Main initialization.
Definition: main_fbw.c:78
bool fbw_motors_on
Definition: main_fbw.c:42
void main_fbw_event(void)
Definition: main_fbw.c:263
uint8_t fbw_mode
Fly by wire modes.
Definition: main_fbw.c:41
void main_fbw_periodic(void)
Definition: main_fbw.c:187
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98