OSD: allow configuring post flight odometer stats
parent
2c7d47bbdc
commit
40965d4ab1
|
@ -3899,6 +3899,15 @@
|
|||
"osdDescStatMaxFFT": {
|
||||
"message": "Peak FFT frequency"
|
||||
},
|
||||
"osdDescStatTotalFlights": {
|
||||
"message": "Total number of flights"
|
||||
},
|
||||
"osdDescStatTotalFlightTime": {
|
||||
"message": "Total time spent flying"
|
||||
},
|
||||
"osdDescStatTotalFlightDistance": {
|
||||
"message": "Total distance traveled"
|
||||
},
|
||||
|
||||
"osdTimerSource": {
|
||||
"message": "Source:"
|
||||
|
|
|
@ -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: {
|
||||
|
@ -1337,6 +1349,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
|
||||
|
|
Loading…
Reference in New Issue