From 1842e960616903b2ac4d452745003c1b4403b2eb Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Mon, 12 Jun 2017 19:23:55 +0100 Subject: [PATCH] Add numerical heading and vario OSD elements --- tabs/osd.js | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/tabs/osd.js b/tabs/osd.js index a67070e7..90da98db 100755 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -26,6 +26,7 @@ SYM.PB_EMPTY = 0x8D; SYM.PB_END = 0x8E; SYM.PB_CLOSE = 0x8F; SYM.BATTERY = 0x96; +SYM.ARROW_NORTH=0x68; SYM.ARROW_SOUTH=0x60; SYM.ARROW_EAST=0x64; @@ -456,19 +457,31 @@ OSD.constants = { preview: FONT.symbol(SYM.FLY_M) + '02:07' }, HOME_DIR: { - name: 'HOME_DIRECTION', - default_position: -1, - positionable: true, - preview: FONT.symbol(SYM.ARROW_SOUTH + 2) + name: 'HOME_DIRECTION', + default_position: -1, + positionable: true, + preview: FONT.symbol(SYM.ARROW_SOUTH + 2) }, HOME_DIST: { - name: 'HOME_DISTANCE', - default_position: -1, - positionable: true, - preview: function(osd_data) { - return '43' + FONT.symbol(osd_data.unit_mode === 0 ? SYM.FEET : SYM.METRE) - } - } + name: 'HOME_DISTANCE', + default_position: -1, + positionable: true, + preview: function(osd_data) { + return '43' + FONT.symbol(osd_data.unit_mode === 0 ? SYM.FEET : SYM.METRE) + } + }, + NUMERICAL_HEADING: { + name: 'NUMERICAL_HEADING', + default_position: -1, + positionable: true, + preview: FONT.symbol(SYM.ARROW_EAST) + '90' + }, + NUMERICAL_VARIO: { + name: 'NUMERICAL_VARIO', + default_position: -1, + positionable: true, + preview: FONT.symbol(SYM.ARROW_NORTH) + '8.7' + } }, ALL_STATISTIC_FIELDS: { @@ -561,7 +574,9 @@ OSD.chooseFields = function () { F.ARMED_TIME, F.DISARMED, F.HOME_DIR, - F.HOME_DIST + F.HOME_DIST, + F.NUMERICAL_HEADING, + F.NUMERICAL_VARIO ]); } }