From 25cd902bd067cebd8ed4693d1185a7d8b8012f1d Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Sun, 13 May 2018 12:31:29 -0400 Subject: [PATCH] Fix OSD preview to use correct units suffix for GPS speed Respect the units selection and display "K" for metric and "M" for imperial. --- src/js/tabs/osd.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 6c8046e3..24b29619 100755 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -519,7 +519,9 @@ OSD.constants = { default_position: -1, draw_order: 330, positionable: true, - preview: ' 40K' + preview: function(osd_data) { + return ' 40' + (osd_data.unit_mode === 0 ? 'M' : 'K'); + } }, GPS_SATS: { name: 'GPS_SATS',