Paparazzi UAS
v5.18.0_stable
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"
27
#include "
modules/settings/rc_settings.h
"
28
#include "
autopilot.h
"
29
#include "
firmwares/fixedwing/nav.h
"
30
#include "
subsystems/sensors/infrared.h
"
31
#include "
inter_mcu.h
"
32
#include "
firmwares/fixedwing/stabilization/stabilization_attitude.h
"
33
34
uint8_t
rc_settings_mode
= 0;
35
float
slider_1_val
,
slider_2_val
;
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
}
slider_1_val
float slider_1_val
Definition:
rc_settings.c:35
inter_mcu.h
rc_settings_mode
uint8_t rc_settings_mode
Definition:
rc_settings.c:34
stabilization_attitude.h
rc_settings.h
uint8_t
unsigned char uint8_t
Definition:
types.h:14
autopilot.h
nav.h
inttypes.h
rc_settings
void rc_settings(bool mode_changed)
Includes generated code from tuning_rc.xml.
Definition:
rc_settings.c:49
infrared.h
slider_2_val
float slider_2_val
Definition:
rc_settings.c:35
sw
airborne
modules
settings
rc_settings.c
Generated on Tue Feb 1 2022 13:51:16 for Paparazzi UAS by
1.8.17