Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
auto1_commands.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 OpenUAS
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, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 *
21 */
22
23#include "auto1_commands.h"
24#include "generated/airframe.h"
25#include "autopilot.h"
27#include "generated/modules.h" // for radio_control channels
28
30{
31 // Copy Radio commands in AUTO1
33#ifdef COMMAND_GEAR
34#ifndef RADIO_GEAR
35#error auto1_commands COMMAND_GEAR needs RADIO_GEAR channel
36#endif
38#endif
39#ifdef COMMAND_FLAP
40#ifndef RADIO_FLAP
41#error auto1_commands COMMAND_FLAP needs RADIO_FLAP channel
42#endif
44#endif
45#ifdef COMMAND_AUX1
46#ifndef RADIO_AUX1
47#error auto1_commands COMMAND_AUX1 needs RADIO_AUX1 channel
48#endif
50#endif
51#ifdef COMMAND_AUX2
52#ifndef RADIO_AUX2
53#error auto1_commands COMMAND_AUX2 needs RADIO_AUX2 channel
54#endif
56#endif
57#ifdef COMMAND_AUX3
58#ifndef RADIO_AUX3
59#error auto1_commands COMMAND_AUX1 needs RADIO_AUX3 channel
60#endif
62#endif
63#ifdef COMMAND_AUX4
64#ifndef RADIO_AUX4
65#error auto1_commands COMMAND_AUX4 needs RADIO_AUX4 channel
66#endif
68#endif
69#ifdef COMMAND_AUX5
70#ifndef RADIO_AUX5
71#error auto1_commands COMMAND_AUX5 needs RADIO_AUX5 channel
72#endif
74#endif
75#ifdef COMMAND_AUX6
76#ifndef RADIO_AUX6
77#error auto1_commands COMMAND_AUX6 needs RADIO_AUX6 channel
78#endif
80#endif
81#ifdef COMMAND_AUX7
82#ifndef RADIO_AUX7
83#error auto1_commands COMMAND_AUX7 needs RADIO_AUX7 channel
84#endif
86#endif
87#ifdef COMMAND_BRAKE
88#ifndef RADIO_BRAKE
89#error auto1_commands COMMAND_BRAKE needs RADIO_BRAKE channel
90#endif
92#endif
93#ifdef COMMAND_HATCH
94#ifndef RADIO_HATCH
95#error auto1_commands COMMAND_HATCH needs RADIO_HATCH channel
96#endif
98#endif
99 }
100}
void periodic_auto1_commands(void)
Enable AUTO1 commands flaps and hatch from RC.
uint8_t autopilot_get_mode(void)
get autopilot mode
Definition autopilot.c:222
Core autopilot interface common to all firmwares.
Hardware independent code for commands handling.
#define AP_MODE_AUTO1
uint16_t foo
Definition main_demo5.c:58
static pprz_t radio_control_get(uint8_t idx)
Get a radio control channel value.
#define RADIO_AUX3
Definition rc_intermcu.h:43
#define RADIO_FLAP
#define RADIO_GEAR