Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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 
34 
35 #define ParamValInt16(param_init_val, param_travel, cur_pulse, init_pulse) \
36  (param_init_val + (int16_t)(((float)(cur_pulse - init_pulse)) * param_travel / (float)MAX_PPRZ))
37 
38 #define ParamValFloat(param_init_val, param_travel, cur_pulse, init_pulse) \
39  (param_init_val + ((float)(cur_pulse - init_pulse)) * param_travel / (float)MAX_PPRZ)
40 
41 #define RcChannel(x) (radio_control_get(x))
42 
44 #include "generated/settings.h"
45 
46 
47 void rc_settings(bool mode_changed __attribute__((unused)))
48 {
49  RCSettings(mode_changed);
50 }
Core autopilot interface common to all firmwares.
Fixed wing horizontal control.
Fixedwing Navigation library.
uint8_t rc_settings_mode
Definition: rc_settings.c:32
float slider_1_val
Definition: rc_settings.c:33
void rc_settings(bool mode_changed)
Includes generated code from tuning_rc.xml.
Definition: rc_settings.c:47
float slider_2_val
Definition: rc_settings.c:33
Variable setting though the radio control.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98