Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rc_settings.c
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
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  */
23 
24 
25 #include <inttypes.h>
26 #include "generated/radio.h"
28 #include "autopilot.h"
31 #include "inter_mcu.h"
33 
36 
37 #define ParamValInt16(param_init_val, param_travel, cur_pulse, init_pulse) \
38  (param_init_val + (int16_t)(((float)(cur_pulse - init_pulse)) * param_travel / (float)MAX_PPRZ))
39 
40 #define ParamValFloat(param_init_val, param_travel, cur_pulse, init_pulse) \
41  (param_init_val + ((float)(cur_pulse - init_pulse)) * param_travel / (float)MAX_PPRZ)
42 
43 #define RcChannel(x) (imcu_get_radio(x))
44 
46 #include "generated/settings.h"
47 
48 
49 void rc_settings(bool mode_changed __attribute__((unused)))
50 {
51  RCSettings(mode_changed);
52 }
Communication between fbw and ap processes.
uint8_t rc_settings_mode
Definition: rc_settings.c:34
Variable setting though the radio control.
Fixed wing horizontal control.
void rc_settings(bool mode_changed)
Includes generated code from tuning_rc.xml.
Definition: rc_settings.c:49
float slider_1_val
Definition: rc_settings.c:35
Core autopilot interface common to all firmwares.
unsigned char uint8_t
Definition: types.h:14
float slider_2_val
Definition: rc_settings.c:35