1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 09:45:37 +03:00

Updated linked mode processing

Allows links and ranges in a single mode.
Code styling changes.
Add config validation for chained links (not allowed).
This commit is contained in:
Dave Huber 2019-02-21 14:45:11 -06:00
parent 3114d2e562
commit 6a67972c6c
3 changed files with 43 additions and 5 deletions

View file

@ -338,6 +338,16 @@ static void validateAndFixConfig(void)
}
#endif
for (int i = 0; i < MAX_MODE_ACTIVATION_CONDITION_COUNT; i++) {
const modeActivationCondition_t *mac = modeActivationConditions(i);
if (mac->linkedTo) {
if (mac->modeId == BOXARM || isModeActivationConditionLinked(mac->linkedTo)) {
removeModeActivationCondition(mac->modeId);
}
}
}
// clear features that are not supported.
// I have kept them all here in one place, some could be moved to sections of code above.