Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
stabilization_none.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2011-2012 The Paparazzi Team
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
29
#include "
firmwares/rotorcraft/stabilization.h
"
30
#include "
firmwares/rotorcraft/stabilization/stabilization_none.h
"
31
32
#include "
subsystems/radio_control.h
"
33
#include "generated/airframe.h"
34
35
struct
Int32Rates
stabilization_none_rc_cmd
;
36
37
void
stabilization_none_init
(
void
)
38
{
39
INT_RATES_ZERO
(
stabilization_none_rc_cmd
);
40
}
41
42
void
stabilization_none_read_rc
(
void
)
43
{
44
45
stabilization_none_rc_cmd
.
p
= (
int32_t
)
radio_control
.
values
[
RADIO_ROLL
];
46
stabilization_none_rc_cmd
.
q
= (
int32_t
)
radio_control
.
values
[
RADIO_PITCH
];
47
stabilization_none_rc_cmd
.
r
= (
int32_t
)
radio_control
.
values
[
RADIO_YAW
];
48
}
49
50
void
stabilization_none_enter
(
void
)
51
{
52
INT_RATES_ZERO
(
stabilization_none_rc_cmd
);
53
}
54
55
void
stabilization_none_run
(
bool
in_flight __attribute__((unused)))
56
{
57
/* just directly pass rc commands through */
58
stabilization_cmd
[COMMAND_ROLL] =
stabilization_none_rc_cmd
.
p
;
59
stabilization_cmd
[COMMAND_PITCH] =
stabilization_none_rc_cmd
.
q
;
60
stabilization_cmd
[COMMAND_YAW] =
stabilization_none_rc_cmd
.
r
;
61
}
radio_control.h
RADIO_ROLL
#define RADIO_ROLL
Definition:
intermcu_ap.h:41
Int32Rates
angular rates
Definition:
pprz_algebra_int.h:179
INT_RATES_ZERO
#define INT_RATES_ZERO(_e)
Definition:
pprz_algebra_int.h:575
Int32Rates::q
int32_t q
in rad/s with INT32_RATE_FRAC
Definition:
pprz_algebra_int.h:181
stabilization_none_init
void stabilization_none_init(void)
Definition:
stabilization_none.c:37
Int32Rates::p
int32_t p
in rad/s with INT32_RATE_FRAC
Definition:
pprz_algebra_int.h:180
stabilization_none_rc_cmd
struct Int32Rates stabilization_none_rc_cmd
Definition:
stabilization_none.c:35
int32_t
signed long int32_t
Definition:
types.h:19
stabilization_none_enter
void stabilization_none_enter(void)
Definition:
stabilization_none.c:50
stabilization_cmd
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
Definition:
stabilization.c:32
RADIO_YAW
#define RADIO_YAW
Definition:
intermcu_ap.h:43
stabilization.h
RADIO_PITCH
#define RADIO_PITCH
Definition:
intermcu_ap.h:42
Int32Rates::r
int32_t r
in rad/s with INT32_RATE_FRAC
Definition:
pprz_algebra_int.h:182
stabilization_none.h
stabilization_none_run
void stabilization_none_run(bool in_flight)
Definition:
stabilization_none.c:55
radio_control
struct RadioControl radio_control
Definition:
radio_control.c:30
stabilization_none_read_rc
void stabilization_none_read_rc(void)
Definition:
stabilization_none.c:42
RadioControl::values
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
Definition:
radio_control.h:69
sw
airborne
firmwares
rotorcraft
stabilization
stabilization_none.c
Generated on Tue Feb 1 2022 13:51:14 for Paparazzi UAS by
1.8.17