1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-25 17:25:14 +03:00

minor fix on output mapping

This commit is contained in:
shota 2023-10-13 04:27:39 +09:00
parent c41129b156
commit 0bb8c1521b
2 changed files with 5 additions and 5 deletions

View file

@ -133,11 +133,10 @@ let ServoMixerRuleCollection = function () {
} }
} }
let unique = [...new Set(out)];
return unique.sort(function(a, b) { let minIndex = Math.min(...out);
return a-b; let maxIndex = Math.max(...out);
}); return Array.from({ length: maxIndex - minIndex + 1 }, (_, index) => minIndex + index);
} }
self.getNextUnusedIndex = function() { self.getNextUnusedIndex = function() {

View file

@ -170,8 +170,9 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
motors.push(outputPad); motors.push(outputPad);
} else { } else {
let servo = servoRules.getServoMixRuleFromTarget(omIndex[1]); let servo = servoRules.getServoMixRuleFromTarget(omIndex[1]);
if (servo == null) {continue;}
let divID = "servoPreview" + omIndex[1]; let divID = "servoPreview" + omIndex[1];
switch (parseInt(servo.getInput())) { switch (parseInt(servo.getInput())) {
case INPUT_STABILIZED_PITCH: case INPUT_STABILIZED_PITCH:
case STABILIZED_PITCH_POSITIVE: case STABILIZED_PITCH_POSITIVE: