Reset mixer to MIXER_CUSTOM if configured mixer is not supported

This commit is contained in:
jflyper 2017-05-29 12:13:33 +09:00
parent bc736c7754
commit ba99a372a1
1 changed files with 6 additions and 0 deletions

View File

@ -546,6 +546,12 @@ void activateConfig(void)
void validateAndFixConfig(void) void validateAndFixConfig(void)
{ {
#if !defined(USE_UNCOMMON_MIXERS) || defined(USE_QUADX_MIXER_ONLY)
if (mixers[mixerConfigMutable()->mixerMode].motor == NULL) {
mixerConfigMutable()->mixerMode = MIXER_CUSTOM;
}
#endif
#ifndef USE_OSD_SLAVE #ifndef USE_OSD_SLAVE
if((motorConfig()->dev.motorPwmProtocol == PWM_TYPE_BRUSHED) && (motorConfig()->mincommand < 1000)){ if((motorConfig()->dev.motorPwmProtocol == PWM_TYPE_BRUSHED) && (motorConfig()->mincommand < 1000)){
motorConfigMutable()->mincommand = 1000; motorConfigMutable()->mincommand = 1000;