mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-26 01:35:23 +03:00
Updated video systems available based on MSP displayport being selected
This commit is contained in:
parent
3d2d80b5bc
commit
6bbcce1010
2 changed files with 31 additions and 13 deletions
|
@ -3601,7 +3601,7 @@
|
||||||
"message": "Show preview guides"
|
"message": "Show preview guides"
|
||||||
},
|
},
|
||||||
"osd_video_HELP": {
|
"osd_video_HELP": {
|
||||||
"message": "For HD keep within the red lines for 4:3, HDZero keep within the blue box for a higher refresh rate, AUTO/PAL the green line is NTSC limit ."
|
"message": "For HD: red lines show 4:3 screen, HDZero: keep within the blue box for a higher refresh rate, AUTO/PAL: green line is NTSC limit."
|
||||||
},
|
},
|
||||||
"osd_dji_HD_FPV": {
|
"osd_dji_HD_FPV": {
|
||||||
"message" : "DJI HD FPV"
|
"message" : "DJI HD FPV"
|
||||||
|
|
42
tabs/osd.js
42
tabs/osd.js
|
@ -2362,6 +2362,9 @@ OSD.GUI.checkAndProcessSymbolPosition = function(pos, charCode) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const mspVideoSystem = [1,3,4]; // indexes of PAL, HDZERO, & DJIWTF
|
||||||
|
const analogVideoSystem = [0,1,2]; // indexes of AUTO, PAL, & NTSC
|
||||||
|
|
||||||
OSD.GUI.updateVideoMode = function() {
|
OSD.GUI.updateVideoMode = function() {
|
||||||
// video mode
|
// video mode
|
||||||
var $videoTypes = $('.video-types').empty();
|
var $videoTypes = $('.video-types').empty();
|
||||||
|
@ -2371,29 +2374,44 @@ OSD.GUI.updateVideoMode = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OSD.data.isMspDisplay) {
|
if (OSD.data.isMspDisplay) {
|
||||||
if (OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] != 'HDZERO') {
|
if (mspVideoSystem.includes(OSD.data.preferences.video_system) == false) {
|
||||||
OSD.data.preferences.video_system = OSD.constants.VIDEO_TYPES.indexOf('HDZERO');
|
OSD.data.preferences.video_system = OSD.constants.VIDEO_TYPES.indexOf('HDZERO');
|
||||||
OSD.updateDisplaySize();
|
OSD.updateDisplaySize();
|
||||||
OSD.GUI.saveConfig();
|
OSD.GUI.saveConfig();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] == 'HDZERO' || OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] == 'DJIWTF') {
|
if (analogVideoSystem.includes(OSD.data.preferences.video_system) == false) {
|
||||||
OSD.data.preferences.video_system = OSD.constants.VIDEO_TYPES.indexOf('AUTO')
|
OSD.data.preferences.video_system = OSD.constants.VIDEO_TYPES.indexOf('AUTO')
|
||||||
OSD.updateDisplaySize();
|
OSD.updateDisplaySize();
|
||||||
OSD.GUI.saveConfig();
|
OSD.GUI.saveConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < OSD.constants.VIDEO_TYPES.length; i++) {
|
if (OSD.data.isMspDisplay) {
|
||||||
if ((OSD.constants.VIDEO_TYPES[i] != 'HDZERO' && OSD.constants.VIDEO_TYPES[i] != 'DJIWTF') || OSD.data.isMspDisplay)
|
for (var i = 0; i < OSD.constants.VIDEO_TYPES.length; i++) {
|
||||||
{
|
if (mspVideoSystem.includes(i))
|
||||||
$videoTypes.append(
|
{
|
||||||
$('<label/>')
|
$videoTypes.append(
|
||||||
.append($('<input name="video_system" type="radio"/>' + OSD.constants.VIDEO_TYPES[i] + '</label>')
|
$('<label/>')
|
||||||
.prop('checked', i === OSD.data.preferences.video_system)
|
.append($('<input name="video_system" type="radio"/>' + OSD.constants.VIDEO_TYPES[i] + '</label>')
|
||||||
.data('type', i)
|
.prop('checked', i === OSD.data.preferences.video_system)
|
||||||
)
|
.data('type', i)
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (var i = 0; i < OSD.constants.VIDEO_TYPES.length; i++) {
|
||||||
|
if (analogVideoSystem.includes(i))
|
||||||
|
{
|
||||||
|
$videoTypes.append(
|
||||||
|
$('<label/>')
|
||||||
|
.append($('<input name="video_system" type="radio"/>' + OSD.constants.VIDEO_TYPES[i] + '</label>')
|
||||||
|
.prop('checked', i === OSD.data.preferences.video_system)
|
||||||
|
.data('type', i)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue