From 10809ba6b65c64fa44d4ff363e8de19d3b47233d Mon Sep 17 00:00:00 2001 From: borisbstyle Date: Wed, 13 Jan 2016 23:08:14 +0100 Subject: [PATCH] Add Mixer quad1234 --- src/main/flight/mixer.c | 9 +++++++++ src/main/flight/mixer.h | 3 ++- src/main/io/serial_cli.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index 76fe0cf97..baff80d21 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -206,6 +206,13 @@ static const motorMixer_t mixerSingleProp[] = { { 1.0f, 0.0f, 0.0f, 0.0f }, }; +static const motorMixer_t mixerQuadX1234[] = { + { 1.0f, 1.0f, -1.0f, -1.0f }, // FRONT_L + { 1.0f, -1.0f, -1.0f, 1.0f }, // FRONT_R + { 1.0f, -1.0f, 1.0f, -1.0f }, // REAR_R + { 1.0f, 1.0f, 1.0f, 1.0f }, // REAR_L +}; + // Keep synced with mixerMode_e const mixer_t mixers[] = { // motors, use servo, motor mixer @@ -235,6 +242,7 @@ const mixer_t mixers[] = { { 0, false, NULL }, // MIXER_CUSTOM { 2, true, NULL }, // MIXER_CUSTOM_AIRPLANE { 3, true, NULL }, // MIXER_CUSTOM_TRI + { 4, false, mixerQuadX1234 }, }; #endif @@ -318,6 +326,7 @@ const mixerRules_t servoMixers[] = { { 0, NULL }, // MULTITYPE_CUSTOM { 0, NULL }, // MULTITYPE_CUSTOM_PLANE { 0, NULL }, // MULTITYPE_CUSTOM_TRI + { 0, NULL }, }; static servoMixer_t *customServoMixers; diff --git a/src/main/flight/mixer.h b/src/main/flight/mixer.h index e35c298e8..da90b1f7f 100644 --- a/src/main/flight/mixer.h +++ b/src/main/flight/mixer.h @@ -50,7 +50,8 @@ typedef enum mixerMode MIXER_ATAIL4 = 22, MIXER_CUSTOM = 23, MIXER_CUSTOM_AIRPLANE = 24, - MIXER_CUSTOM_TRI = 25 + MIXER_CUSTOM_TRI = 25, + MIXER_QUADX_1234 = 26 } mixerMode_e; // Custom mixer data per motor diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 7fd113ae8..734d4f1c2 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -164,7 +164,7 @@ static const char * const mixerNames[] = { "FLYING_WING", "Y4", "HEX6X", "OCTOX8", "OCTOFLATP", "OCTOFLATX", "AIRPLANE", "HELI_120_CCPM", "HELI_90_DEG", "VTAIL4", "HEX6H", "PPM_TO_SERVO", "DUALCOPTER", "SINGLECOPTER", - "ATAIL4", "CUSTOM", "CUSTOMAIRPLANE", "CUSTOMTRI", NULL + "ATAIL4", "CUSTOM", "CUSTOMAIRPLANE", "CUSTOMTRI", "QUADX1234", NULL }; #endif