1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Refactored the validation code

- The check is active regardless of the USE_UNCOMMON_MIXER to detect
unsupported/insufficiently supported mixers.
- Custom mixers always pass the check.
- Mixer mode resets to MIXER_CUSTOM if motorCount != 0 but motor array
is NULL.
- Mixer mode resets to MIXER_CUSTOM_AIRPLANE if useServo but servo
count is zero.
This commit is contained in:
jflyper 2017-06-01 00:30:04 +09:00
parent 0fcccd7a40
commit 0b1383a730
3 changed files with 19 additions and 10 deletions

View file

@ -148,13 +148,6 @@ static const servoMixer_t servoMixerGimbal[] = {
{ SERVO_GIMBAL_ROLL, INPUT_GIMBAL_ROLL, 125, 0, 0, 100, 0 },
};
// Custom mixer configuration
typedef struct mixerRules_s {
uint8_t servoRuleCount;
const servoMixer_t *rule;
} mixerRules_t;
const mixerRules_t servoMixers[] = {
{ 0, NULL }, // entry 0
{ COUNT_SERVO_RULES(servoMixerTri), servoMixerTri }, // MULTITYPE_TRI