1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

moving towards custom mixer table and proper fixedwing mixer.

refactored all of mixer.c to use tables instead of hardcoded mix.
custom mixer is stored in flash, but currently has no UI to configure it.
do not choose mixer CUSTOM in console.

hover-tested QUADX, if upgrading anything else, please carefully check motor response first, preferably without props on heavy models.
tec

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@206 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop@gmail.com 2012-09-05 23:44:55 +00:00
parent fef43457c0
commit 98cba890e1
4 changed files with 2865 additions and 2822 deletions

View file

@ -89,6 +89,19 @@ typedef enum GimbalFlags {
#define abs(x) ((x) > 0 ? (x) : -(x))
#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt)))
typedef struct motorMixer_t {
float throttle;
float roll;
float pitch;
float yaw;
} motorMixer_t;
typedef struct mixer_t {
uint8_t numberMotor;
uint8_t useServo;
const motorMixer_t *motor;
} mixer_t;
typedef struct config_t {
uint8_t version;
uint8_t mixerConfiguration;
@ -179,8 +192,10 @@ typedef struct config_t {
uint16_t nav_speed_min; // cm/sec
uint16_t nav_speed_max; // cm/sec
// serial(uart1) baudrate
// serial(uart1) baudrate
uint32_t serial_baudrate;
motorMixer_t customMixer[MAX_MOTORS]; // custom mixtable
} config_t;
typedef struct flags_t {