Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
rc_settings.c
Go to the documentation of this file.
1 /*
2  * $Id$
3  * Flight-time calibration facility
4  *
5  * Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
6  *
7  * This file is part of paparazzi.
8  *
9  * paparazzi is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2, or (at your option)
12  * any later version.
13  *
14  * paparazzi is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with paparazzi; see the file COPYING. If not, write to
21  * the Free Software Foundation, 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  *
24  */
25 
26 
27 #include <inttypes.h>
28 #include "generated/radio.h"
29 #include "rc_settings.h"
30 #include "autopilot.h"
31 #include "subsystems/nav.h"
33 #include "estimator.h"
34 #include "inter_mcu.h"
36 
39 
40 #define ParamValInt16(param_init_val, param_travel, cur_pulse, init_pulse) \
41 (param_init_val + (int16_t)(((float)(cur_pulse - init_pulse)) * param_travel / (float)MAX_PPRZ))
42 
43 #define ParamValFloat(param_init_val, param_travel, cur_pulse, init_pulse) \
44 (param_init_val + ((float)(cur_pulse - init_pulse)) * param_travel / (float)MAX_PPRZ)
45 
46 #define RcChannel(x) (fbw_state->channels[x])
47 
49 #include "generated/settings.h"
50 
51 
52 void rc_settings(bool_t mode_changed __attribute__ ((unused))) {
53  RCSettings(mode_changed);
54 }
uint8_t rc_settings_mode
Definition: rc_settings.c:37
Variable setting though the radio control.
float slider_1_val
Definition: rc_settings.c:38
void rc_settings(bool_t mode_changed __attribute__((unused)))
Includes generated code from tuning_rc.xml.
Definition: rc_settings.c:52
unsigned char uint8_t
Definition: types.h:14
float slider_2_val
Definition: rc_settings.c:38
State estimation, fusioning sensors.
__attribute__((always_inline))
Definition: i2c_arch.c:35