Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
autopilot_generated.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Gautier Hattenberger <gautier.hattenberger@enac.fr>
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#define AUTOPILOT_CORE_AP_C
28
30#include "autopilot.h"
31
37
38#include "generated/settings.h"
39
40
42{
43 // call generated init
45 // copy generated mode to public mode (set at startup)
47}
48
49
51{
52
54
55 // copy generated mode to public mode (may be changed on internal exceptions)
57
58#if defined MCU_SPI_LINK || defined MCU_UART_LINK || defined MCU_CAN_LINK
60#elif defined INTER_MCU && defined SINGLE_MCU
63#endif
64
65}
66
75
76
83
84
86{
87 // only needed for consistency with other firmwares
88 autopilot.motors_on = motors_on;
89}
90
91
93{
94#ifdef SetAutoCommandsFromRC
96#elif defined RADIO_YAW && defined COMMAND_YAW
98#endif
99}
100
struct pprz_autopilot autopilot
Global autopilot structure.
Definition autopilot.c:49
Core autopilot interface common to all firmwares.
bool motors_on
motor status
Definition autopilot.h:68
uint8_t mode
current autopilot mode
Definition autopilot.h:63
Hardware independent code for commands handling.
void autopilot_generated_SetModeHandler(float mode)
AP mode setting handler.
void autopilot_generated_periodic(void)
void autopilot_generated_set_mode(uint8_t new_autopilot_mode)
void autopilot_generated_init(void)
void autopilot_generated_on_rc_frame(void)
void autopilot_generated_set_motors_on(bool motors_on)
Autopilot generated implementation Calls the code generated from autopilot XML file.
uint16_t foo
Definition main_demo5.c:58
Hardware independent API for actuators (servos, motor controllers).
struct RadioControl radio_control
Generic interface for radio control modules.
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
static pprz_t radio_control_get(uint8_t idx)
Get a radio control channel value.
Persistent settings interface.
static const ShellCommand commands[]
Definition shell_arch.c:78
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
Definition sonar_bebop.c:65
Periodic telemetry system header (includes downlink utility and generated code).
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.