Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
motor_mixing.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-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 
28 #ifndef MOTOR_MIXING_H
29 #define MOTOR_MIXING_H
30 
31 #include "std.h"
32 #include "paparazzi.h"
33 #include "generated/airframe.h"
34 #include "motor_mixing_types.h"
35 
36 struct MotorMixing {
37  int32_t commands[MOTOR_MIXING_NB_MOTOR];
38  int32_t trim[MOTOR_MIXING_NB_MOTOR];
39  bool override_enabled[MOTOR_MIXING_NB_MOTOR];
40  int32_t override_value[MOTOR_MIXING_NB_MOTOR];
43 };
44 
45 extern struct MotorMixing motor_mixing;
46 
47 extern void motor_mixing_init(void);
48 extern void motor_mixing_run(bool motors_on, bool override_on, pprz_t in_cmd[]);
49 extern void motor_mixing_run_spinup(uint32_t counter, uint32_t max_counter);
50 
51 #endif /* MOTOR_MIXING_H */
MotorMixing::trim
int32_t trim[MOTOR_MIXING_NB_MOTOR]
Definition: motor_mixing.h:38
MotorMixing
Definition: motor_mixing.h:36
motor_mixing_init
void motor_mixing_init(void)
Definition: motor_mixing.c:109
MotorMixing::nb_failure
uint32_t nb_failure
Definition: motor_mixing.h:42
MotorMixing::override_enabled
bool override_enabled[MOTOR_MIXING_NB_MOTOR]
Definition: motor_mixing.h:39
motor_mixing
struct MotorMixing motor_mixing
Definition: motor_mixing.c:94
motor_mixing_types.h
uint32_t
unsigned long uint32_t
Definition: types.h:18
counter
int32_t counter
Definition: avoid_navigation.c:55
paparazzi.h
std.h
motor_mixing_run
void motor_mixing_run(bool motors_on, bool override_on, pprz_t in_cmd[])
Definition: motor_mixing.c:193
pprz_t
int16_t pprz_t
Definition: paparazzi.h:6
MotorMixing::override_value
int32_t override_value[MOTOR_MIXING_NB_MOTOR]
Definition: motor_mixing.h:40
MotorMixing::nb_saturation
uint32_t nb_saturation
Definition: motor_mixing.h:41
motor_mixing_run_spinup
void motor_mixing_run_spinup(uint32_t counter, uint32_t max_counter)
Definition: motor_mixing.c:168
int32_t
signed long int32_t
Definition: types.h:19
MotorMixing::commands
int32_t commands[MOTOR_MIXING_NB_MOTOR]
Definition: motor_mixing.h:37