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

OSD: combined ON/ARM timer

This commit is contained in:
Krzysztof Matula 2019-04-14 17:20:02 +02:00
parent 2c7d47bbdc
commit 6c47496e12

View file

@ -272,6 +272,7 @@ OSD.generateTimerPreview = function (osd_data, timer_index) {
var preview = '';
switch (osd_data.timers[timer_index].src) {
case 0:
case 3:
preview += FONT.symbol(SYM.ON_M);
break;
case 1:
@ -380,11 +381,6 @@ OSD.constants = {
'IMPERIAL',
'METRIC'
],
TIMER_TYPES: [
'ON TIME',
'TOTAL ARMED TIME',
'LAST ARMED TIME'
],
TIMER_PRECISION: [
'SECOND',
'HUNDREDTH'
@ -1365,6 +1361,17 @@ OSD.chooseFields = function () {
F.GPS_RESCUE_DISABLED
]);
}
OSD.constants.TIMER_TYPES = [
'ON TIME',
'TOTAL ARMED TIME',
'LAST ARMED TIME'
];
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
OSD.constants.TIMER_TYPES = OSD.constants.TIMER_TYPES.concat([
'ON/ARM TIME'
]);
}
};
OSD.updateDisplaySize = function () {