mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Merge pull request #999 from McGiverGim/bf-add_battery_stats
Add OSD statistic battery
This commit is contained in:
commit
6440fb542e
2 changed files with 13 additions and 0 deletions
|
@ -3274,6 +3274,10 @@
|
||||||
"osdDescStatRtcDateTime": {
|
"osdDescStatRtcDateTime": {
|
||||||
"message": "Date and time from real time clock"
|
"message": "Date and time from real time clock"
|
||||||
},
|
},
|
||||||
|
"osdDescStatBattery": {
|
||||||
|
"message": "Voltage of the battery in real time"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
"osdTimerSource": {
|
"osdTimerSource": {
|
||||||
"message": "Source:"
|
"message": "Source:"
|
||||||
|
|
|
@ -981,6 +981,10 @@ OSD.constants = {
|
||||||
RTC_DATE_TIME: {
|
RTC_DATE_TIME: {
|
||||||
name: 'RTC_DATE_TIME',
|
name: 'RTC_DATE_TIME',
|
||||||
desc: 'osdDescStatRtcDateTime'
|
desc: 'osdDescStatRtcDateTime'
|
||||||
|
},
|
||||||
|
STAT_BATTERY: {
|
||||||
|
name: 'STAT_BATTERY',
|
||||||
|
desc: 'osdDescStatBattery'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ALL_WARNINGS: {
|
ALL_WARNINGS: {
|
||||||
|
@ -1162,6 +1166,11 @@ OSD.chooseFields = function () {
|
||||||
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
|
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
|
||||||
F.RTC_DATE_TIME
|
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
|
// Choose warnings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue