Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
rc_settings.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2006- Pascal Brisset, Antoine Drouin
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
34
#ifndef RC_SETTINGS_H
35
#define RC_SETTINGS_H
36
37
#if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS
38
39
#include "
std.h
"
40
#include "generated/radio.h"
41
42
#define RC_SETTINGS_MODE_NONE 0
43
#define RC_SETTINGS_MODE_DOWN 1
44
#define RC_SETTINGS_MODE_UP 2
45
52
extern
uint8_t
rc_settings_mode
;
53
54
extern
float
slider_1_val
,
slider_2_val
;
55
56
void
rc_settings
(
bool
mode_changed);
57
58
#define RcSettingsOff() (rc_settings_mode==RC_SETTINGS_MODE_NONE)
59
60
#define RC_SETTINGS_MODE_OF_PULSE(pprz) (pprz < THRESHOLD1 ? RC_SETTINGS_MODE_DOWN : \
61
(pprz < THRESHOLD2 ? RC_SETTINGS_MODE_NONE : \
62
RC_SETTINGS_MODE_UP))
63
64
#define RcSettingsModeUpdate(_rc_channels) \
65
ModeUpdate(rc_settings_mode, RC_SETTINGS_MODE_OF_PULSE(_rc_channels[RADIO_CALIB]))
66
67
68
#else
/* RADIO_CALIB && defined RADIO_CONTROL_SETTINGS */
69
70
#define RcSettingsOff() TRUE
71
72
#endif
/* ! (RADIO_CALIB && defined RADIO_CONTROL_SETTINGS) */
73
74
#endif // RC_SETTINGS_H
slider_1_val
float slider_1_val
Definition:
rc_settings.c:35
std.h
uint8_t
unsigned char uint8_t
Definition:
types.h:14
rc_settings_mode
uint8_t rc_settings_mode
Definition:
autopilot_firmware.c:54
rc_settings
void rc_settings(bool mode_changed)
Includes generated code from tuning_rc.xml.
Definition:
rc_settings.c:49
slider_2_val
float slider_2_val
Definition:
rc_settings.c:35
sw
airborne
modules
settings
rc_settings.h
Generated on Tue Feb 1 2022 13:51:16 for Paparazzi UAS by
1.8.17