Autodrone
Multi-Domain Vehicle
mixer.h File Reference

This file takes the output of the PID controller and assigns values to the motors. More...

Go to the source code of this file.

Macros

#define PIDMIXFLIGHT(X, Y, Z, T)   (ratePID[ROLL] * (X) + ratePID[PITCH] * (Y) + eepromConfig.yawDirection * ratePID[YAW] * (Z) + throttleCmd * (T))
 
#define PIDMIXROVER(X, T)   (steerCmd * (X) + speedCmd * (T))
 
#define THROTTLE_DEADBAND   400
 
#define THROTTLE_DEADBAND_SLOPE   ((4000 - THROTTLE_DEADBAND)/4000.0f)
 

Functions

void pulseMotors (void)
 Pulses the motors. More...
 
void mixTable (void)
 Mixes the values from the PID controller and assigns values to the motors. More...
 

Variables

uint8_t numberMotor
 
uint16_t throttleCmd
 
int16_t steerCmd
 
int16_t speedCmd
 
int16_t motor_temp [4]
 

Detailed Description

This file takes the output of the PID controller and assigns values to the motors.

Author
Jeremy Wolfe
Date
07 MAR 2022

Macro Definition Documentation

◆ PIDMIXFLIGHT

#define PIDMIXFLIGHT (   X,
  Y,
  Z,
 
)    (ratePID[ROLL] * (X) + ratePID[PITCH] * (Y) + eepromConfig.yawDirection * ratePID[YAW] * (Z) + throttleCmd * (T))

◆ PIDMIXROVER

#define PIDMIXROVER (   X,
 
)    (steerCmd * (X) + speedCmd * (T))

◆ THROTTLE_DEADBAND

#define THROTTLE_DEADBAND   400

◆ THROTTLE_DEADBAND_SLOPE

#define THROTTLE_DEADBAND_SLOPE   ((4000 - THROTTLE_DEADBAND)/4000.0f)

Function Documentation

◆ mixTable()

void mixTable ( void  )

Mixes the values from the PID controller and assigns values to the motors.

Returns
Void.

◆ pulseMotors()

void pulseMotors ( void  )

Pulses the motors.

Returns
Void.

Variable Documentation

◆ motor_temp

int16_t motor_temp[4]
extern

◆ numberMotor

uint8_t numberMotor
extern

◆ speedCmd

int16_t speedCmd

◆ steerCmd

int16_t steerCmd
extern

◆ throttleCmd

uint16_t throttleCmd
extern