From 15e62c569466d259b9777c1c1fd2e1e64912d90f Mon Sep 17 00:00:00 2001 From: Roman Sorokin Date: Tue, 13 Feb 2024 12:18:35 +0300 Subject: [PATCH] QNE Altitude --- _locales/en/messages.json | 6 ++++++ tabs/osd.js | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 8c05b768a..33167b320 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -4091,6 +4091,12 @@ "osdElement_OSD_RANGEFINDER": { "message": "Rangefinder distance" }, + "osdElement_QNE_ALTITUDE": { + "message": "QNE Altitude" + }, + "osdElement_QNE_ALTITUDE_HELP": { + "message": "Altitude above normal pressure" + }, "osdSettingPLUS_CODE_DIGITS_HELP": { "message": "Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm." }, diff --git a/tabs/osd.js b/tabs/osd.js index 95393953d..fc2f74727 100644 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -1220,7 +1220,21 @@ OSD.constants = { return FONT.embed_dot('25.6') + FONT.symbol(SYM.DIST_KM); } } - } + }, + { + name: 'QNE_ALTITUDE', + id: 147, + preview: function () { + switch (OSD.data.preferences.units) { + case 0: // Imperial + case 3: // UK + case 4: // GA + return ' 375' + FONT.symbol(SYM.ALT_FT); + default: // Metric + return ' 114' + FONT.symbol(SYM.ALT_M); + } + } + }, ] }, {