From 5b16361f3b96a8b1bd2323f319ad3db90b9f39b9 Mon Sep 17 00:00:00 2001 From: Bas Delfos Date: Sat, 15 Jul 2017 14:48:16 +0200 Subject: [PATCH] Display craftname in OSD preview --- tabs/osd.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tabs/osd.js b/tabs/osd.js index c996eff8..c4621b34 100755 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -254,6 +254,13 @@ OSD.generateTimerPreview = function(osd_data, timer_index) { return preview; }; +OSD.generateCraftName = function(osd_data) { + var preview = 'CRAFT_NAME'; + if (CONFIG.name != '') + preview = CONFIG.name.toUpperCase(); + return preview; +} + OSD.constants = { VISIBLE: 0x0800, VIDEO_TYPES: [ @@ -383,7 +390,10 @@ OSD.constants = { desc: 'osdDescElementCraftName', default_position: -77, positionable: true, - preview: 'CRAFT_NAME' + preview: function(osd_data) { + return OSD.generateCraftName(osd_data, 1); + } + //preview: 'c' }, ALTITUDE: { name: 'ALTITUDE',