1
0
Fork 0
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:
Pawel Spychalski (DzikuVx) 2018-05-24 14:32:21 +02:00
parent 8e2768377c
commit 6d40d8e020
4 changed files with 33 additions and 5 deletions

View file

@ -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;
};