From aecfcb5569c2022b92081a7b35fb0765f4e07b00 Mon Sep 17 00:00:00 2001 From: Jonas Elvedal Hole Date: Wed, 7 Oct 2020 19:46:02 +0200 Subject: [PATCH] Implement GVar OSD --- _locales/en/messages.json | 17 ++++++++++++++++- tabs/osd.js | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index f9240d30..5922631d 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2555,7 +2555,7 @@ "message": "VTX" }, "osdGroupCRSF": { - "message": "CRSF RX Statistics" + "message": "CRSF RX Statistics" }, "osdGroupMapsAndRadars": { "message": "Maps and Radars" @@ -2845,6 +2845,21 @@ "osdElement_ESC_TEMPERATURE_HELP": { "message": "Temperature of the ESC read from DSHOT telemetry" }, + "osdGroupGVars": { + "message": "Global Variables" + }, + "osdElement_GVAR_0": { + "message": "Global Variable 0" + }, + "osdElement_GVAR_1": { + "message": "Global Variable 1" + }, + "osdElement_GVAR_2": { + "message": "Global Variable 2" + }, + "osdElement_GVAR_3": { + "message": "Global Variable 3" + }, "osdElement_SENSOR1_TEMPERATURE": { "message": "Temperature sensor 1" }, diff --git a/tabs/osd.js b/tabs/osd.js index 6ce61a94..f1321dee 100644 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -90,6 +90,10 @@ SYM.DB = 0xEB; SYM.DBM = 0xEC; SYM.MW = 0xED; SYM.SNR = 0xEE; +SYM.GVAR_1 = 0xEF; +SYM.GVAR_2 = 0xF0; +SYM.GVAR_3 = 0xF1; +SYM.GVAR_4 = 0xF2; var FONT = FONT || {}; @@ -1372,6 +1376,35 @@ OSD.constants = { }, ] }, + { + name: 'osdGroupGVars', + items: [ + { + name: 'GVAR_0', + id: 113, + positionable: true, + preview: 'G0:01337' + }, + { + name: 'GVAR_1', + id: 114, + positionable: true, + preview: 'G1:31415' + }, + { + name: 'GVAR_2', + id: 115, + positionable: true, + preview: 'G2:01611' + }, + { + name: 'GVAR_3', + id: 116, + positionable: true, + preview: 'G3:30126' + } + ] + }, { name: 'osdGroupPIDs', items: [