From 534c172ca683ed28d590bed6aefa20bc532c3670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Garci=CC=81a=20Hierro?= Date: Sun, 6 Jan 2019 18:19:36 +0000 Subject: [PATCH] Add support for MSL Altitude OSD indicator --- _locales/en/messages.json | 6 ++++++ tabs/osd.js | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 020f9fa5..a50f5c50 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2512,6 +2512,12 @@ "osdElement_GPS_SPEED_HELP": { "message": "Shows GPS ground speed." }, + "osdElement_MSL_ALTITUDE": { + "message": "MSL Altitude" + }, + "osdElement_MSL_ALTITUDE_HELP": { + "message": "Altitude above Mean Sea Level" + }, "osdElement_3D_SPEED": { "message": "3D Speed" }, diff --git a/tabs/osd.js b/tabs/osd.js index c2e5f233..22812d3b 100644 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -807,6 +807,17 @@ OSD.constants = { return FONT.embed_dot(' 40') + FONT.symbol(SYM.KMH); } }, + { + name: 'MSL_ALTITUDE', + id: 87, + preview: function(osd_data) { + if (OSD.data.preferences.units === 0) { + // Imperial + return FONT.symbol(SYM.ALT_FT) + '275'; + } + return FONT.symbol(SYM.ALT_M) + '477'; + }, + }, { name: '3D_SPEED', id: 85,