From adc3114b4078578a087466fb15e33907b0e1237d Mon Sep 17 00:00:00 2001 From: Jon Mahoney Date: Wed, 19 Oct 2022 22:15:27 -0400 Subject: Ready Mode Ready Mode allows the pilot to signal they are ready. Ideal for race lines so all pilots are ready to race. --- locales/en/messages.json | 7 +++++++ src/js/tabs/osd.js | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/locales/en/messages.json b/locales/en/messages.json index 083956ee..05025a1d 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -5412,6 +5412,13 @@ "osdDescTxUplinkPower": { "message": "Shows a value of the Tx power (mW or W). Useful when Dynamic Power 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/js/tabs/osd.js b/src/js/tabs/osd.js index 558682be..35f384ea 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -938,6 +938,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', @@ -1663,6 +1672,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 +1758,7 @@ 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.READY_MODE, ]); } } -- cgit v1.2.3 From d61a2564e2b68a02e0cb36af540662f020937e1c Mon Sep 17 00:00:00 2001 From: Ivan Efimov Date: Thu, 20 Oct 2022 23:15:54 -0500 Subject: Presets fix: search bar z-index should keep it above the presets panels --- src/tabs/presets/presets.less | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3 From ee4284b63ba1c30ede91e54980aa01defdbd37c0 Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Fri, 21 Oct 2022 22:33:50 +0100 Subject: Add OSD (MSP Displayport) option to port peripherals --- locales/en/messages.json | 3 +++ src/js/msp/MSPHelper.js | 2 ++ src/js/tabs/ports.js | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/locales/en/messages.json b/locales/en/messages.json index 083956ee..ba75b109 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" }, 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/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}`); } -- cgit v1.2.3 From 416604a27e6f7cb9489ebc42b497e14dac6944b3 Mon Sep 17 00:00:00 2001 From: asizon Date: Sun, 23 Oct 2022 18:30:09 +0200 Subject: Fix container for phones --- src/css/main.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- cgit v1.2.3 From 98e698b39a6ef69579851f48280f9509ed4da65b Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Sun, 23 Oct 2022 02:06:20 +0200 Subject: Add aux value element --- locales/en/messages.json | 8 ++++++++ src/js/tabs/osd.js | 28 +++++++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index 05025a1d..a9f6ae18 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -4980,6 +4980,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" diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 35f384ea..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', @@ -1325,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', + }, }; }; @@ -1758,6 +1767,7 @@ 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, ]); } -- cgit v1.2.3