diff options
author | blckmn <blackman@xtra.com.au> | 2022-10-30 10:51:32 +0300 |
---|---|---|
committer | blckmn <blackman@xtra.com.au> | 2022-10-30 10:51:32 +0300 |
commit | fbff80dbbb16cc473ccf257c153cf712baea818b (patch) | |
tree | f58686fc7e827e4648367bf8d85c2dffcaaa7c84 | |
parent | 6aae7957813e6469bb87849245eca7582e1c639c (diff) | |
parent | c3a81ca438d8123ebf3e54b47362d83ce7704af8 (diff) |
Merge branch 'master' into cloud_build
-rw-r--r-- | locales/en/messages.json | 18 | ||||
-rw-r--r-- | src/css/main.less | 4 | ||||
-rw-r--r-- | src/js/msp/MSPHelper.js | 2 | ||||
-rw-r--r-- | src/js/tabs/osd.js | 39 | ||||
-rw-r--r-- | src/js/tabs/ports.js | 4 | ||||
-rw-r--r-- | src/tabs/presets/presets.less | 1 |
6 files changed, 57 insertions, 11 deletions
diff --git a/locales/en/messages.json b/locales/en/messages.json index 9645040f..328d6579 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -1630,6 +1630,9 @@ "portsFunction_VTX_MSP": { "message": "VTX (MSP)" }, + "portsFunction_MSP_DISPLAYPORT": { + "message": "OSD (MSP Displayport)" + }, "pidTuningProfileOption": { "message": "Profile $1" }, @@ -4982,6 +4985,14 @@ "osdDescElementWhDrawn": { "message": "Total battery capacity used in Wh" }, + "osdDescElementAuxValue": { + "message": "Aux value", + "description": "Displays a receiver AUX channel see PR 10789" + }, + "osdTextElementAuxValue": { + "message": "Aux value", + "description": "One of the elements of the OSD" + }, "osdTextElementCraftName": { "message": "Craft name", "description": "One of the elements of the OSD" @@ -5414,6 +5425,13 @@ "osdDescTxUplinkPower": { "message": "Shows a value of the Tx power (mW or W). Useful when <i>Dynamic Power</i> is enabled for supporting radios" }, + "osdTextElementReadyMode": { + "message": "Ready Mode", + "description": "When active READY will be displayed until flying" + }, + "osdDescElementReadyMode": { + "message": "When active READY will be displayed until flying" + }, "osdTextElementUnknown": { "message": "Unknown $1", "description": "One of the elements of the OSD" diff --git a/src/css/main.less b/src/css/main.less index baa30765..78d4a62f 100644 --- a/src/css/main.less +++ b/src/css/main.less @@ -2147,14 +2147,14 @@ button.active { top: 0; left: -304px; bottom: 0; - width: 300px; + width: 300px !important; transition: all 0.3s; } .tab_container.reveal { left: 0; } #content { - width: 100%; + width: 100% !important; } dialog { position: fixed; diff --git a/src/js/msp/MSPHelper.js b/src/js/msp/MSPHelper.js index 20abf3f2..3bfa6a6c 100644 --- a/src/js/msp/MSPHelper.js +++ b/src/js/msp/MSPHelper.js @@ -34,6 +34,7 @@ function MspHelper() { 'LIDAR_TF': 15, 'FRSKY_OSD': 16, 'VTX_MSP': 17, + 'MSP_DISPLAYPORT': 18, }; self.REBOOT_TYPES = { @@ -2922,6 +2923,7 @@ MspHelper.prototype.serialPortFunctionsToMask = function(functions) { mask = bit_set(mask, bitIndex); } } + return mask; }; diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 558682be..db88f876 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -742,15 +742,6 @@ OSD.loadDisplayFields = function() { return semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_36) ? ` 690${FONT.symbol(SYM.MAH)}` : `${FONT.symbol(SYM.MAH)}690`; }, }, - WH_DRAWN: { - name: 'WH_DRAWN', - text: 'osdTextElementWhDrawn', - desc: 'osdDescElementWhDrawn', - defaultPosition: -1, - draw_order: 145, - positionable: true, - preview: '1.10 WH', - }, CRAFT_NAME: { name: 'CRAFT_NAME', text: 'osdTextElementCraftName', @@ -938,6 +929,15 @@ OSD.loadDisplayFields = function() { positionable: true, preview: `${FONT.symbol(SYM.PITCH)}-00.0`, }, + READY_MODE: { + name: 'READY_MODE', + text: 'osdTextElementReadyMode', + desc: 'osdDescElementReadyMode', + defaultPosition: -1, + draw_order: 255, + positionable: true, + preview: 'READY', + }, ROLL_ANGLE: { name: 'ROLL_ANGLE', text: 'osdTextElementRollAngle', @@ -1316,6 +1316,24 @@ OSD.loadDisplayFields = function() { positionable: true, preview: `${FONT.symbol(SYM.RSSI)}250MW`, }, + WH_DRAWN: { + name: 'WH_DRAWN', + text: 'osdTextElementWhDrawn', + desc: 'osdDescElementWhDrawn', + defaultPosition: -1, + draw_order: 475, + positionable: true, + preview: '1.10 WH', + }, + AUX_VALUE: { + name: 'AUX_VALUE', + text: 'osdTextElementAuxValue', + desc: 'osdDescElementAuxValue', + defaultPosition: -1, + draw_order: 480, + positionable: true, + preview: 'AUX', + }, }; }; @@ -1663,6 +1681,7 @@ OSD.chooseFields = function() { F.GPS_SATS, F.ALTITUDE, ]); + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_31)) { OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ F.PID_ROLL, @@ -1748,6 +1767,8 @@ OSD.chooseFields = function() { if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) { OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ F.WH_DRAWN, + F.AUX_VALUE, + F.READY_MODE, ]); } } diff --git a/src/js/tabs/ports.js b/src/js/tabs/ports.js index 21bcde62..71a7d91b 100644 --- a/src/js/tabs/ports.js +++ b/src/js/tabs/ports.js @@ -62,6 +62,10 @@ ports.initialize = function (callback) { functionRules.push({ name: 'VTX_MSP', groups: ['peripherals'], maxPorts: 1 }); } + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) { + functionRules.push({ name: 'MSP_DISPLAYPORT', groups: ['peripherals'], maxPorts: 1 }); + } + for (const rule of functionRules) { rule.displayName = i18n.getMessage(`portsFunction_${rule.name}`); } diff --git a/src/tabs/presets/presets.less b/src/tabs/presets/presets.less index 31037845..279e9c0d 100644 --- a/src/tabs/presets/presets.less +++ b/src/tabs/presets/presets.less @@ -185,6 +185,7 @@ position: sticky; top: 0px; background-color: var(--boxBackground); + z-index: 10; } .ms-drop { background-color: var(--boxBackground) !important; |