mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 00:35:20 +03:00
show only configured servos
This commit is contained in:
parent
8e2768377c
commit
6d40d8e020
4 changed files with 33 additions and 5 deletions
|
@ -58,5 +58,19 @@ var ServoMixerRuleCollection = function () {
|
|||
return data.length < self.getServoRulesCount();
|
||||
};
|
||||
|
||||
self.isServoConfigured = function(servoId) {
|
||||
|
||||
for (let ruleIndex in data) {
|
||||
if (data.hasOwnProperty(ruleIndex)) {
|
||||
let rule = data[ruleIndex];
|
||||
|
||||
if (rule.getTarget() == servoId && rule.isUsed()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue