Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
autopilot_static.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2003 Pascal Brisset, Antoine Drouin
3  * Copyright (C) 2017 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 
29 #ifndef AUTOPILOT_STATIC_H
30 #define AUTOPILOT_STATIC_H
31 
32 #include "autopilot.h"
33 
36 #define AP_MODE_MANUAL 0
37 #define AP_MODE_AUTO1 1
38 #define AP_MODE_AUTO2 2
39 #define AP_MODE_HOME 3
40 #define AP_MODE_GPS_OUT_OF_ORDER 4
41 #define AP_MODE_NB 5
42 
45 extern void autopilot_static_init(void);
46 extern void autopilot_static_periodic(void);
47 extern void autopilot_static_on_rc_frame(void);
48 extern void autopilot_static_set_mode(uint8_t new_autopilot_mode);
49 extern void autopilot_static_SetModeHandler(float new_autopilot_mode); // handler for dl_setting
50 extern void autopilot_static_set_motors_on(bool motors_on);
51 
55 extern void navigation_task(void);
56 extern void attitude_loop(void);
57 
58 
59 /* CONTROL_RATE will be removed in the next release
60  * please use CONTROL_FREQUENCY instead
61  */
62 #ifndef CONTROL_FREQUENCY
63 #ifdef CONTROL_RATE
64 #define CONTROL_FREQUENCY CONTROL_RATE
65 #warning "CONTROL_RATE is deprecated. Please use CONTROL_FREQUENCY instead. Defaults to 60Hz if not defined."
66 #else
67 #define CONTROL_FREQUENCY 60
68 #endif // CONTROL_RATE
69 #endif // CONTROL_FREQUENCY
70 
71 #ifndef NAVIGATION_FREQUENCY
72 #define NAVIGATION_FREQUENCY 4
73 #endif
74 
75 #endif /* AUTOPILOT_STATIC_H */
76 
void attitude_loop(void)
void autopilot_static_set_motors_on(bool motors_on)
void autopilot_static_periodic(void)
void autopilot_static_SetModeHandler(float new_autopilot_mode)
AP mode setting handler.
void autopilot_static_init(void)
Static autopilot functions.
void navigation_task(void)
Control loops FIXME should be somewhere else.
Core autopilot interface common to all firmwares.
void autopilot_static_on_rc_frame(void)
Function to be called when a message from FBW is available.
unsigned char uint8_t
Definition: types.h:14
void autopilot_static_set_mode(uint8_t new_autopilot_mode)