1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 00:05:22 +03:00

Add OSD statistic battery

This commit is contained in:
Miguel Angel Mulero Martinez 2018-04-03 19:58:02 +02:00
parent c08a8da011
commit 22439528fc
2 changed files with 13 additions and 0 deletions

View file

@ -883,6 +883,10 @@ OSD.constants = {
RTC_DATE_TIME: {
name: 'RTC_DATE_TIME',
desc: 'osdDescStatRtcDateTime'
},
STAT_BATTERY: {
name: 'STAT_BATTERY',
desc: 'osdDescStatBattery'
}
},
ALL_WARNINGS: {
@ -1050,6 +1054,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