1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00

Updated mixer

- Tidied up the code a little and grouped mixer types in model.js.
- Removed second motor from all fixed wing mixers that aren't differential thrust. A bug was discovered that if an FC only has a single motor output, and 2 motors are set in the mixer, the motors won't work.
- Added mixer for V-Tail with differential thrust
- Enhanced the new servo button. Clicking it now selects the next available servo number, rather than just 0.
This commit is contained in:
Darren Lines 2022-02-14 19:55:00 +00:00
parent a31aa128f1
commit 47a9f4b36e
3 changed files with 184 additions and 140 deletions

View file

@ -99,5 +99,20 @@ let ServoMixerRuleCollection = function () {
});
}
self.getNextUnusedIndex = function() {
let nextTarget = 0;
for (let ruleIndex in data) {
if (data.hasOwnProperty(ruleIndex)) {
let target = data[ruleIndex].getTarget();
if (target > nextTarget) {
nextTarget = target;
}
}
}
return nextTarget+1;
}
return self;
};