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:
parent
3114d2e562
commit
6a67972c6c
3 changed files with 43 additions and 5 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue