diff --git a/src/main/drivers/pwm_mapping.h b/src/main/drivers/pwm_mapping.h index 423a1ac1f4..3711ec12d0 100644 --- a/src/main/drivers/pwm_mapping.h +++ b/src/main/drivers/pwm_mapping.h @@ -19,13 +19,7 @@ #include "drivers/io_types.h" -#if defined(USE_QUAD_MIXER_ONLY) -#define MAX_PWM_MOTORS 4 -#define MAX_PWM_SERVOS 1 -#define MAX_MOTORS 4 -#define MAX_SERVOS 1 - -#elif defined(TARGET_MOTOR_COUNT) +#if defined(TARGET_MOTOR_COUNT) #define MAX_PWM_MOTORS TARGET_MOTOR_COUNT #define MAX_PWM_SERVOS 8 #define MAX_MOTORS TARGET_MOTOR_COUNT diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index 6b626c3ad4..6925976220 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -142,7 +142,6 @@ static void cliBootlog(char *cmdline); static const char* const emptyName = "-"; -#ifndef USE_QUAD_MIXER_ONLY // sync this with mixerMode_e static const char * const mixerNames[] = { "TRI", "QUADP", "QUADX", "BI", @@ -152,7 +151,6 @@ static const char * const mixerNames[] = { "HEX6H", "PPM_TO_SERVO", "DUALCOPTER", "SINGLECOPTER", "ATAIL4", "CUSTOM", "CUSTOMAIRPLANE", "CUSTOMTRI", NULL }; -#endif // sync this with features_e static const char * const featureNames[] = { @@ -964,7 +962,6 @@ static void cliAdjustmentRange(char *cmdline) } } -#ifndef USE_QUAD_MIXER_ONLY static void printMotorMix(uint8_t dumpMask, const motorMixer_t *customMotorMixer, const motorMixer_t *defaultCustomMotorMixer) { const char *format = "mmix %d %s %s %s %s"; @@ -1067,7 +1064,6 @@ static void cliMotorMix(char *cmdline) } } } -#endif // USE_QUAD_MIXER_ONLY static void printRxRange(uint8_t dumpMask, const rxChannelRangeConfig_t *channelRangeConfigs, const rxChannelRangeConfig_t *defaultChannelRangeConfigs) { @@ -2007,7 +2003,6 @@ static void cliGpsPassthrough(char *cmdline) } #endif -#ifndef USE_QUAD_MIXER_ONLY static void cliMixer(char *cmdline) { int len; @@ -2041,7 +2036,6 @@ static void cliMixer(char *cmdline) cliMixer(""); } -#endif static void cliMotor(char *cmdline) { @@ -2571,7 +2565,6 @@ static void printConfig(const char *cmdline, bool doDiff) cliPrintHashLine("resources"); //printResource(dumpMask, &defaultConfig); -#ifndef USE_QUAD_MIXER_ONLY cliPrintHashLine("mixer"); const bool equalsDefault = mixerConfig_Copy.mixerMode == mixerConfig()->mixerMode; const char *formatMixer = "mixer %s"; @@ -2591,7 +2584,6 @@ static void printConfig(const char *cmdline, bool doDiff) // print servo parameters cliPrintHashLine("servo"); printServo(dumpMask, servoParams_CopyArray, servoParams(0)); -#endif #endif cliPrintHashLine("feature"); @@ -2743,12 +2735,10 @@ const clicmd_t cmdTable[] = { CLI_COMMAND_DEF("led", "configure leds", NULL, cliLed), #endif CLI_COMMAND_DEF("map", "configure rc channel order", "[]", cliMap), -#ifndef USE_QUAD_MIXER_ONLY CLI_COMMAND_DEF("mixer", "configure mixer", "list\r\n" "\t", cliMixer), CLI_COMMAND_DEF("mmix", "custom motor mixer", NULL, cliMotorMix), -#endif CLI_COMMAND_DEF("motor", "get/set motor", " []", cliMotor), CLI_COMMAND_DEF("name", "name of craft", NULL, cliName), #ifdef PLAY_SOUND diff --git a/src/main/fc/fc_core.c b/src/main/fc/fc_core.c index 9723e51509..92e7bccded 100755 --- a/src/main/fc/fc_core.c +++ b/src/main/fc/fc_core.c @@ -756,14 +756,12 @@ void taskMainPidLoop(timeUs_t currentTimeUs) // motors do not spin up while we are trying to arm or disarm. // Allow yaw control for tricopters if the user wants the servo to move even when unarmed. if (isUsingSticksForArming() && rcData[THROTTLE] <= rxConfig()->mincheck -#ifndef USE_QUAD_MIXER_ONLY #ifdef USE_SERVOS && !((mixerConfig()->mixerMode == MIXER_TRI || mixerConfig()->mixerMode == MIXER_CUSTOM_TRI) && servoConfig()->tri_unarmed_servo) #endif && mixerConfig()->mixerMode != MIXER_AIRPLANE && mixerConfig()->mixerMode != MIXER_FLYING_WING && mixerConfig()->mixerMode != MIXER_CUSTOM_AIRPLANE -#endif ) { rcCommand[YAW] = 0; } diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 9e8022638e..51a2eef424 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -2175,7 +2175,6 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src) return MSP_RESULT_ERROR; break; -#ifndef USE_QUAD_MIXER_ONLY case MSP_SET_MIXER: if (dataSize >= 1) { mixerConfigMutable()->mixerMode = sbufReadU8(src); @@ -2183,7 +2182,6 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src) } else return MSP_RESULT_ERROR; break; -#endif case MSP_SET_RX_CONFIG: if (dataSize >= 24) { @@ -2244,12 +2242,8 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src) case MSP_SET_BF_CONFIG: if (dataSize >= 16) { -#ifdef USE_QUAD_MIXER_ONLY - sbufReadU8(src); // mixerMode ignored -#else mixerConfigMutable()->mixerMode = sbufReadU8(src); // mixerMode mixerUpdateStateFlags(); // Required for correct preset functionality -#endif featureClearAll(); featureSet(sbufReadU32(src)); // features bitmap diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index 3e7e8a9b0e..dc4c75447c 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -112,7 +112,6 @@ static const motorMixer_t mixerQuadX[] = { #define DEF_MIXER(_mixerMode, _motorCount, _useServos, _motorMap) \ { .mixerMode=_mixerMode, .motorCount=_motorCount, .useServos=_useServos, .motor=_motorMap } -#ifndef USE_QUAD_MIXER_ONLY static const motorMixer_t mixerTricopter[] = { { 1.0f, 0.0f, 1.333333f, 0.0f }, // REAR { 1.0f, -1.0f, -0.666667f, 0.0f }, // RIGHT @@ -276,21 +275,13 @@ static const mixer_t mixerTable[] = { #endif #endif }; -#else -static const mixer_t quadMixerDescriptor = DEF_MIXER( MIXER_QUADX, 4, false, mixerQuadX); -#endif // USE_QUAD_MIXER_ONLY const mixer_t * findMixer(mixerMode_e mixerMode) { -#ifndef USE_QUAD_MIXER_ONLY for (unsigned ii = 0; ii < sizeof(mixerTable)/sizeof(mixerTable[0]); ii++) { if (mixerTable[ii].mixerMode == mixerMode) return &mixerTable[ii]; } -#else - if (mixerMode == MIXER_QUADX) - return &quadMixerDescriptor; -#endif return NULL; } @@ -307,13 +298,8 @@ bool mixerIsOutputSaturated(void) bool isMixerEnabled(mixerMode_e mixerMode) { -#ifdef USE_QUAD_MIXER_ONLY - UNUSED(mixerMode); - return true; -#else const mixer_t * mixer = findMixer(mixerMode); return (mixer != NULL) ? true : false; -#endif } #ifdef USE_SERVOS @@ -388,8 +374,6 @@ void mixerUsePWMIOConfiguration(void) } #endif - -#ifndef USE_QUAD_MIXER_ONLY void mixerLoadMix(int index, motorMixer_t *customMixers) { // we're 1-based @@ -408,8 +392,6 @@ void mixerLoadMix(int index, motorMixer_t *customMixers) } } -#endif - void mixerResetDisarmedMotors(void) { // set disarmed motor values diff --git a/src/main/flight/mixer.h b/src/main/flight/mixer.h index fa5990b299..39818faac8 100644 --- a/src/main/flight/mixer.h +++ b/src/main/flight/mixer.h @@ -19,9 +19,7 @@ #include "config/parameter_group.h" -#if defined(USE_QUAD_MIXER_ONLY) -#define MAX_SUPPORTED_MOTORS 4 -#elif defined(TARGET_MOTOR_COUNT) +#if defined(TARGET_MOTOR_COUNT) #define MAX_SUPPORTED_MOTORS TARGET_MOTOR_COUNT #else #define MAX_SUPPORTED_MOTORS 12 diff --git a/src/main/flight/servos.h b/src/main/flight/servos.h index 456f51ec9d..cebf622f6c 100644 --- a/src/main/flight/servos.h +++ b/src/main/flight/servos.h @@ -19,11 +19,7 @@ #include "config/parameter_group.h" -#if defined(USE_QUAD_MIXER_ONLY) -#define MAX_SUPPORTED_SERVOS 1 -#else #define MAX_SUPPORTED_SERVOS 8 -#endif // These must be consecutive, see 'reversedSources' enum { diff --git a/src/main/target/CRAZEPONYMINI/target.h b/src/main/target/CRAZEPONYMINI/target.h_ similarity index 100% rename from src/main/target/CRAZEPONYMINI/target.h rename to src/main/target/CRAZEPONYMINI/target.h_