diff --git a/locales/en/messages.json b/locales/en/messages.json index 2f724e25..d4fd8d97 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -3274,6 +3274,10 @@ "osdDescStatRtcDateTime": { "message": "Date and time from real time clock" }, + "osdDescStatBattery": { + "message": "Voltage of the battery in real time" + }, + "osdTimerSource": { "message": "Source:" diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index bc06024d..f305ac62 100755 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -981,6 +981,10 @@ OSD.constants = { RTC_DATE_TIME: { name: 'RTC_DATE_TIME', desc: 'osdDescStatRtcDateTime' + }, + STAT_BATTERY: { + name: 'STAT_BATTERY', + desc: 'osdDescStatBattery' } }, ALL_WARNINGS: { @@ -1162,6 +1166,11 @@ OSD.chooseFields = function () { OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([ F.RTC_DATE_TIME ]); + if (semver.gte(CONFIG.apiVersion, "1.38.0")) { + OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([ + F.STAT_BATTERY + ]); + } } // Choose warnings