diff --git a/locales/en/messages.json b/locales/en/messages.json index 558871df..9cb2dc93 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -3295,7 +3295,9 @@ "osdDescAntiGravity": { "message": "Enables an indicator when the anti gravity is active" }, - + "osdDescGForce": { + "message": "Shows how much G-Force the craft is experiencing" + }, "osdDescStatMaxSpeed": { "message": "Maximum recorded speed" }, diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index ed98a66e..d9bbaa13 100755 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -774,6 +774,14 @@ OSD.constants = { draw_order: 320, positionable: true, preview: 'AG' + }, + G_FORCE: { + name: 'G_FORCE', + desc: 'osdDescGForce', + default_position: -1, + draw_order: 11, + positionable: true, + preview: '1.0G' } }, UNKNOWN_DISPLAY_FIELD: { @@ -978,17 +986,22 @@ OSD.chooseFields = function () { F.ESC_RPM ]); if (semver.gte(CONFIG.apiVersion, "1.37.0")) { + OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ + F.REMAINING_TIME_ESTIMATE, + F.RTC_DATE_TIME, + F.ADJUSTMENT_RANGE, + F.CORE_TEMPERATURE + ]); + if (semver.gte(CONFIG.apiVersion, "1.39.0")) { OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ - F.REMAINING_TIME_ESTIMATE, - F.RTC_DATE_TIME, - F.ADJUSTMENT_RANGE, - F.CORE_TEMPERATURE + F.ANTI_GRAVITY ]); - if (semver.gte(CONFIG.apiVersion, "1.39.0")) { - OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ - F.ANTI_GRAVITY - ]); + if (semver.gte(CONFIG.apiVersion, "1.40.0")) { + OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([ + F.G_FORCE + ]); } + } } } }