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:
parent
0fcccd7a40
commit
0b1383a730
3 changed files with 19 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue