Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tabs
diff options
context:
space:
mode:
authorJeff Hendrix <Jeff.Hendrix@wdc.com>2022-10-01 09:40:50 +0300
committerJeff Hendrix <Jeff.Hendrix@wdc.com>2022-10-02 22:45:23 +0300
commitffee3d3935a3da851a81088942e394db3a682e17 (patch)
tree407f63f6b237b0b42363688fcb6f203a48f95bc2 /tabs
parent0917397880d8eaba4ca8ffb65d9af0e52e252cf0 (diff)
Added support for DJI wtfos MSP-OSD full screen 59x22 OSD
Diffstat (limited to 'tabs')
-rw-r--r--tabs/osd.js53
-rw-r--r--tabs/ports.js4
2 files changed, 45 insertions, 12 deletions
diff --git a/tabs/osd.js b/tabs/osd.js
index 44bd89d3..099ff15f 100644
--- a/tabs/osd.js
+++ b/tabs/osd.js
@@ -532,22 +532,26 @@ OSD.constants = {
'AUTO',
'PAL',
'NTSC',
- 'HD'
+ 'HDZERO',
+ 'DJIWTF'
],
VIDEO_LINES: {
PAL: 16,
NTSC: 13,
- HD: 18
+ HDZERO: 18,
+ DJIWTF: 22
},
VIDEO_COLS: {
PAL: 30,
NTSC: 30,
- HD: 50
+ HDZERO: 50,
+ DJIWTF: 60
},
VIDEO_BUFFER_CHARS: {
PAL: 480,
NTSC: 390,
- HD: 900
+ HDZERO: 900,
+ DJIWTF: 1320
},
UNIT_TYPES: [
{name: 'osdUnitImperial', value: 0},
@@ -2063,12 +2067,19 @@ OSD.updateDisplaySize = function () {
}
}
+ // set the preview size if dji wtf
+ $('.third_left').toggleClass('preview_dji_hd_side', video_type == 'DJIWTF')
+ $('.preview').toggleClass('preview_dji_hd cut43_left', video_type == 'DJIWTF')
+ $('.third_right').toggleClass('preview_dji_hd_side', video_type == 'DJIWTF')
+ $('.left_43_margin').toggleClass('dji_hd_43_left', video_type == 'DJIWTF')
+ $('.right_43_margin').toggleClass('dji_hd_43_right', video_type == 'DJIWTF')
+
// set the preview size based on the video type
- $('.third_left').toggleClass('preview_hd_side', (video_type == 'HD'))
- $('.preview').toggleClass('preview_hd cut43_left', (video_type == 'HD'))
- $('.third_right').toggleClass('preview_hd_side', (video_type == 'HD'))
- $('.left_43_margin').toggleClass('hd_43_left', (video_type == 'HD'))
- $('.right_43_margin').toggleClass('hd_43_right', (video_type == 'HD'))
+ $('.third_left').toggleClass('preview_hd_side', (video_type == 'HDZERO'))
+ $('.preview').toggleClass('preview_hd cut43_left', (video_type == 'HDZERO'))
+ $('.third_right').toggleClass('preview_hd_side', (video_type == 'HDZERO'))
+ $('.left_43_margin').toggleClass('hd_43_left', (video_type == 'HDZERO'))
+ $('.right_43_margin').toggleClass('hd_43_right', (video_type == 'HDZERO'))
};
OSD.saveAlarms = function(callback) {
@@ -2354,7 +2365,7 @@ OSD.GUI.checkAndProcessSymbolPosition = function(pos, charCode) {
OSD.GUI.updateVideoMode = function() {
// video mode
var $videoTypes = $('.video-types').empty();
- for (var i = 0; i < OSD.constants.VIDEO_TYPES.length; i++) {
+ for (var i = 0; i < OSD.constants.VIDEO_TYPES.length - 2; i++) {
$videoTypes.append(
$('<label/>')
@@ -2365,6 +2376,28 @@ OSD.GUI.updateVideoMode = function() {
);
}
+ // Add HD modes if MSP Displayport is selected
+ var isHdOsd = false;
+
+ $.each(SERIAL_CONFIG.ports, function(index, port){
+ if(port.functions.includes('MSP_DISPLAYPORT')) {
+ isHdOsd = true;
+ }
+ });
+
+ if (isHdOsd) {
+ for (var i = OSD.constants.VIDEO_TYPES.length - 2; i < OSD.constants.VIDEO_TYPES.length; 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)
+ )
+ );
+ }
+ }
+
$videoTypes.find(':radio').click(function () {
OSD.data.preferences.video_system = $(this).data('type');
OSD.updateDisplaySize();
diff --git a/tabs/ports.js b/tabs/ports.js
index f6320ed9..b17966f4 100644
--- a/tabs/ports.js
+++ b/tabs/ports.js
@@ -67,7 +67,7 @@ TABS.ports.initialize = function (callback) {
name: 'VTX_FFPV',
groups: ['peripherals'],
maxPorts: 1 }
- );
+ );
functionRules.push({
name: 'OPFLOW',
@@ -335,7 +335,7 @@ TABS.ports.initialize = function (callback) {
});
MSP.send_message(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG, mspHelper.crunch(MSPCodes.MSP2_SET_CF_SERIAL_CONFIG), false, save_to_eeprom);
-
+
function save_to_eeprom() {
MSP.send_message(MSPCodes.MSP_EEPROM_WRITE, false, false, on_saved_handler);
}