Merge pull request #1718 from iNavFlight/MrD_Make-pan-servo-select-on-OSD-page-more-intuitive

pull/1720/head
Darren Lines 2 years ago committed by GitHub
commit cc6a7df91c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3049,6 +3049,8 @@ OSD.GUI.saveConfig = function() {
TABS.osd = {};
TABS.osd.initialize = function (callback) {
mspHelper.loadServoMixRules();
if (GUI.active_tab != 'osd') {
GUI.active_tab = 'osd';
}
@ -3388,11 +3390,20 @@ function updatePanServoPreview() {
}
// Update the panServoOutput select to be visibly easier to use
let servoRules = SERVO_RULES;
$('#panServoOutput option').each(function() {
if ($(this).val() === "0") {
let servoIndex = $(this).val();
if (servoIndex === "0") {
$(this).text("OFF");
} else {
$(this).text("S" + $(this).val());
let servo = servoRules.getServoMixRuleFromTarget(servoIndex);
if (servo == null) {
$(this).remove();
} else {
let servoInputIndex = parseInt(servo.getInput());
$(this).text("Servo " + servoIndex + ": " + FC.getServoMixInputName(servoInputIndex));
}
}
});

Loading…
Cancel
Save