1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +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

@ -1053,6 +1053,18 @@ OSD.constants = {
MAX_FFT: {
name: 'MAX_FFT',
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: {
@ -1344,6 +1356,13 @@ OSD.chooseFields = function () {
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