Skip to content

Commit

Permalink
Merge pull request #2222 from iNavFlight/mmosca-dji-no-compat
Browse files Browse the repository at this point in the history
MSP DisplayPort add DJI native
  • Loading branch information
mmosca authored Feb 13, 2025
2 parents 4cffca2 + ab9f6db commit 6721e4d
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions tabs/osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ OSD.constants = {
'DJIWTF',
'AVATAR',
'BF43COMPAT',
'BFHDCOMPAT'
'BFHDCOMPAT',
'DJI_NATIVE'
],
VIDEO_LINES: {
PAL: 16,
Expand All @@ -659,7 +660,8 @@ OSD.constants = {
DJIWTF: 22,
AVATAR: 20,
BF43COMPAT: 16,
BFHDCOMPAT: 20
BFHDCOMPAT: 20,
DJI_NATIVE: 20
},
VIDEO_COLS: {
PAL: 30,
Expand All @@ -668,7 +670,8 @@ OSD.constants = {
DJIWTF: 60,
AVATAR: 53,
BF43COMPAT: 30,
BFHDCOMPAT: 53
BFHDCOMPAT: 53,
DJI_NATIVE: 53,
},
VIDEO_BUFFER_CHARS: {
PAL: 480,
Expand All @@ -677,7 +680,8 @@ OSD.constants = {
DJIWTF: 1320,
AVATAR: 1060,
BF43COMPAT: 480,
BFHDCOMPAT: 1060
BFHDCOMPAT: 1060,
DJI_NATIVE: 1060
},
UNIT_TYPES: [
{name: 'osdUnitImperial', value: 0},
Expand Down Expand Up @@ -2417,9 +2421,9 @@ OSD.updateDisplaySize = function () {
$('.preview').toggleClass('preview_hdzero cut43_left', (video_type == 'HDZERO'))
$('.third_right').toggleClass('preview_hdzero_side', (video_type == 'HDZERO'))
// -- BFHDCOMPAT
$('.third_left').toggleClass('preview_bfhdcompat_side', (video_type == 'BFHDCOMPAT'))
$('.preview').toggleClass('preview_bfhdcompat cut43_left', (video_type == 'BFHDCOMPAT'))
$('.third_right').toggleClass('preview_bfhdcompat_side', (video_type == 'BFHDCOMPAT'))
$('.third_left').toggleClass('preview_bfhdcompat_side', (video_type == 'BFHDCOMPAT' || video_type == 'DJI_NATIVE'))
$('.preview').toggleClass('preview_bfhdcompat cut43_left', (video_type == 'BFHDCOMPAT' || video_type == 'DJI_NATIVE'))
$('.third_right').toggleClass('preview_bfhdcompat_side', (video_type == 'BFHDCOMPAT' || video_type == 'DJI_NATIVE'))

OSD.GUI.updateGuidesView($('#videoGuides').find('input').is(':checked'));
};
Expand Down Expand Up @@ -2708,7 +2712,7 @@ OSD.GUI.checkAndProcessSymbolPosition = function(pos, charCode) {
}
};

const mspVideoSystem = [1,3,4,5,6,7]; // indexes of PAL, HDZERO, DJIWTF, AVATAR, BF43COMPAT & BFHDCOMPAT
const mspVideoSystem = [1,3,4,5,6,7,8]; // indexes of PAL, HDZERO, DJIWTF, AVATAR, BF43COMPAT, BFHDCOMPAT & DJI_NATIVE
const analogVideoSystem = [0,1,2]; // indexes of AUTO, PAL, & NTSC

OSD.GUI.updateVideoMode = function() {
Expand Down Expand Up @@ -3025,7 +3029,7 @@ OSD.GUI.updateGuidesView = function(on) {
$('.hd_avatar_storage_box_left').toggleClass('hd_avatar_storagebox_l', (isAvatar && on))
$('.hd_avatar_storage_box_right').toggleClass('hd_avatar_storagebox_r', (isAvatar && on))

let isBfHdCompat = OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] == 'BFHDCOMPAT';
let isBfHdCompat = OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] == 'BFHDCOMPAT' || OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] == 'DJI_NATIVE';
$('.hd_43_margin_left').toggleClass('hd_bfhdcompat_43_left', (isBfHdCompat && on));
$('.hd_43_margin_right').toggleClass('hd_bfhdcompat_43_right', (isBfHdCompat && on));
$('.hd_bfhdcompat_bottom_box').toggleClass('hd_bfhdcompat_bottom', (isBfHdCompat && on));
Expand Down

0 comments on commit 6721e4d

Please sign in to comment.