Merge pull request #3174 from jflyper/bfdev-reset-unsupported-mixer-to-custom

Reset mixer to MIXER_CUSTOM if configured mixer is not supported
This commit is contained in:
Michael Keller 2017-05-29 16:59:25 +12:00 committed by GitHub
commit 4645b8765b
1 changed files with 6 additions and 0 deletions

View File

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