Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
autopilot_static.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2009 Antoine Drouin <poinix@gmail.com>
3  * Copyright (C) 2016 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, write to
19  * the Free Software Foundation, 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22 
30 #ifndef AUTOPILOT_STATIC_H
31 #define AUTOPILOT_STATIC_H
32 
35 #define AP_MODE_KILL 0
36 #define AP_MODE_FAILSAFE 1
37 #define AP_MODE_HOME 2
38 #define AP_MODE_RATE_DIRECT 3
39 #define AP_MODE_ATTITUDE_DIRECT 4
40 #define AP_MODE_RATE_RC_CLIMB 5
41 #define AP_MODE_ATTITUDE_RC_CLIMB 6
42 #define AP_MODE_ATTITUDE_CLIMB 7
43 #define AP_MODE_RATE_Z_HOLD 8
44 #define AP_MODE_ATTITUDE_Z_HOLD 9
45 #define AP_MODE_HOVER_DIRECT 10
46 #define AP_MODE_HOVER_CLIMB 11
47 #define AP_MODE_HOVER_Z_HOLD 12
48 #define AP_MODE_NAV 13
49 #define AP_MODE_RC_DIRECT 14 // Safety Pilot Direct Commands for helicopter direct control
50 #define AP_MODE_CARE_FREE_DIRECT 15
51 #define AP_MODE_FORWARD 16
52 #define AP_MODE_MODULE 17
53 #define AP_MODE_FLIP 18
54 #define AP_MODE_GUIDED 19
55 
56 
59 #ifndef MODE_MANUAL
60 #define MODE_MANUAL AP_MODE_ATTITUDE_DIRECT
61 #endif
62 #ifndef MODE_AUTO1
63 #define MODE_AUTO1 AP_MODE_HOVER_Z_HOLD
64 #endif
65 #ifndef MODE_AUTO2
66 #define MODE_AUTO2 AP_MODE_NAV
67 #endif
68 
71 extern void autopilot_static_init(void);
72 extern void autopilot_static_periodic(void);
73 extern void autopilot_static_on_rc_frame(void);
74 extern void autopilot_static_set_mode(uint8_t new_autopilot_mode);
75 extern void autopilot_static_SetModeHandler(float new_autopilot_mode); // handler for dl_setting
76 extern void autopilot_static_set_motors_on(bool motors_on);
77 
78 #endif /* AUTOPILOT_STATIC_H */
autopilot_static_on_rc_frame
void autopilot_static_on_rc_frame(void)
Function to be called when a message from FBW is available.
Definition: autopilot_static.c:112
autopilot_static_init
void autopilot_static_init(void)
Static autopilot functions.
Definition: autopilot_static.c:90
autopilot_static_set_mode
void autopilot_static_set_mode(uint8_t new_autopilot_mode)
Definition: autopilot_static.c:194
uint8_t
unsigned char uint8_t
Definition: types.h:14
autopilot_static_set_motors_on
void autopilot_static_set_motors_on(bool motors_on)
Definition: autopilot_static.c:206
autopilot_static_periodic
void autopilot_static_periodic(void)
Definition: autopilot_static.c:104
autopilot_static_SetModeHandler
void autopilot_static_SetModeHandler(float new_autopilot_mode)
AP mode setting handler.
Definition: autopilot_static.c:201