From ec1e1a87cb2f5cd813aa4cc040256f07b89e051f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20P=C3=A9rez?= Date: Mon, 8 May 2017 10:03:16 -0300 Subject: [PATCH] Change VTX_CHANNEL preview and added missing elements to OSD Tab * Change VTX_CHANNEL preview * Add DEBUG * ADD GPS Lon/Lat --- tabs/osd.js | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/tabs/osd.js b/tabs/osd.js index 92b328be..21548f2a 100755 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -277,7 +277,7 @@ OSD.constants = { name: 'VTX_CHANNEL', default_position: 1, positionable: true, - preview: 'R:2' + preview: 'R:2:1' }, VOLTAGE_WARNING: { name: 'VOLTAGE_WARNING', @@ -368,6 +368,24 @@ OSD.constants = { positionable: true, preview: FONT.symbol(SYM.GPS_SAT) + '14' }, + GPS_LON: { + name: 'GPS_LON', + default_position: -1, + positionable: true, + preview: '-00.0' + }, + GPS_LAT: { + name: 'GPS_LAT', + default_position: -1, + positionable: true, + preview: '-00.0' + }, + DEBUG: { + name: 'DEBUG', + default_position: -1, + positionable: true, + preview: 'GDB 0 0 0 0' + }, PID_ROLL: { name: 'PID_ROLL', default_position: 0x800 | (10 << 5) | 2, // 0x0800 | (y << 5) | x @@ -467,15 +485,22 @@ OSD.chooseFields = function () { F.BATTERY_WARNING, F.AVG_CELL_VOLTAGE ]); - if (semver.gte(CONFIG.apiVersion, "1.35.0")) { + if (semver.gte(CONFIG.apiVersion, "1.34.0")) { OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ - F.PITCH_ANGLE, - F.ROLL_ANGLE + F.GPS_LON, + F.GPS_LAT, + F.DEBUG ]); - if (semver.gte(CONFIG.apiVersion, "1.36.0")) { + if (semver.gte(CONFIG.apiVersion, "1.35.0")) { OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ - F.MAIN_BATT_USAGE + F.PITCH_ANGLE, + F.ROLL_ANGLE ]); + if (semver.gte(CONFIG.apiVersion, "1.36.0")) { + OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ + F.MAIN_BATT_USAGE + ]); + } } } }