1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-25 17:25:16 +03:00

Merge pull request #1390 from krzysztofmatula/km-odometer-stats

OSD: allow configuring post flight odometer stats
This commit is contained in:
Michael Keller 2019-04-17 06:24:33 +12:00 committed by GitHub
commit faf78105b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View file

@ -3902,6 +3902,15 @@
"osdDescStatMaxFFT": { "osdDescStatMaxFFT": {
"message": "Peak FFT frequency" "message": "Peak FFT frequency"
}, },
"osdDescStatTotalFlights": {
"message": "Total number of flights"
},
"osdDescStatTotalFlightTime": {
"message": "Total time spent flying"
},
"osdDescStatTotalFlightDistance": {
"message": "Total distance traveled"
},
"osdTimerSource": { "osdTimerSource": {
"message": "Source:" "message": "Source:"

View file

@ -1053,6 +1053,18 @@ OSD.constants = {
MAX_FFT: { MAX_FFT: {
name: 'MAX_FFT', name: 'MAX_FFT',
desc: 'osdDescStatMaxFFT' desc: 'osdDescStatMaxFFT'
},
TOTAL_FLIGHTS: {
name: 'TOTAL_FLIGHTS',
desc: 'osdDescStatTotalFlights'
},
TOTAL_FLIGHT_TIME: {
name: 'TOTAL_FLIGHT_TIME',
desc: 'osdDescStatTotalFlightTime'
},
TOTAL_FLIGHT_DIST: {
name: 'TOTAL_FLIGHT_DIST',
desc: 'osdDescStatTotalFlightDistance'
} }
}, },
ALL_WARNINGS: { ALL_WARNINGS: {
@ -1344,6 +1356,13 @@ OSD.chooseFields = function () {
F.MAX_FFT F.MAX_FFT
]); ]);
} }
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
OSD.constants.STATISTIC_FIELDS = OSD.constants.STATISTIC_FIELDS.concat([
F.TOTAL_FLIGHTS,
F.TOTAL_FLIGHT_TIME,
F.TOTAL_FLIGHT_DIST
]);
}
} }
// Choose warnings // Choose warnings