Autodrone
Multi-Domain Vehicle
mixer.h
Go to the documentation of this file.
1
9
#ifndef __MIXER_H__
10
#define __MIXER_H__
11
12
/* Defines */
13
#define PIDMIXFLIGHT(X,Y,Z,T) (ratePID[ROLL] * (X) + ratePID[PITCH] * (Y) + eepromConfig.yawDirection * ratePID[YAW] * (Z) + throttleCmd * (T))
14
#define PIDMIXROVER(X,T) (steerCmd * (X) + speedCmd * (T))
15
16
#define THROTTLE_DEADBAND 400
17
#define THROTTLE_DEADBAND_SLOPE ((4000 - THROTTLE_DEADBAND)/4000.0f)
18
19
/* Global Variables */
20
extern
uint8_t
numberMotor
;
21
extern
uint16_t
throttleCmd
;
22
extern
int16_t
steerCmd
,
speedCmd
;
23
extern
int16_t
motor_temp
[4];
24
25
/* Function Prototypes */
26
void
pulseMotors
(
void
);
27
void
mixTable
(
void
);
28
29
#endif
/* __MIXER_H__ */
steerCmd
int16_t steerCmd
Definition:
mixer.c:15
mixTable
void mixTable(void)
Mixes the values from the PID controller and assigns values to the motors.
Definition:
mixer.c:37
throttleCmd
uint16_t throttleCmd
Definition:
mixer.c:14
numberMotor
uint8_t numberMotor
Definition:
mixer.c:13
motor_temp
int16_t motor_temp[4]
Definition:
mixer.c:16
speedCmd
int16_t speedCmd
Definition:
mixer.h:22
pulseMotors
void pulseMotors(void)
Pulses the motors.
Definition:
mixer.c:23
STM32CubeIDE
Autodrone32
Src
motion
mixer.h
Generated by
1.9.3