diff options
author | Mark Haslinghuis <mark@numloq.nl> | 2022-10-23 03:06:20 +0300 |
---|---|---|
committer | Mark Haslinghuis <mark@numloq.nl> | 2022-10-25 03:46:09 +0300 |
commit | 98e698b39a6ef69579851f48280f9509ed4da65b (patch) | |
tree | 8dffeeaa9885a1320462774f920df54310eafd08 | |
parent | ce90b0faa76fd0d0f2eb54cfd2840c50093122dd (diff) |
Add aux value element
-rw-r--r-- | locales/en/messages.json | 8 | ||||
-rw-r--r-- | 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, ]); } |