Fix OSD speed unit preview

10.8-maintenance
Miguel Angel Mulero Martinez 2021-04-08 19:20:04 +02:00
parent 9ece824971
commit 6dee93cecd
1 changed files with 2 additions and 1 deletions

View File

@ -713,7 +713,8 @@ OSD.loadDisplayFields = function() {
draw_order: 810,
positionable: true,
preview(osdData) {
const unit = FONT.symbol(osdData.unit_mode === 0 || osdData.unit_mode === 1 ? SYM.MPH : SYM.KPH);
const UNIT_METRIC = OSD.constants.UNIT_TYPES.indexOf("METRIC");
const unit = FONT.symbol(osdData.unit_mode === UNIT_METRIC ? SYM.KPH : SYM.MPH);
return `${FONT.symbol(SYM.SPEED)}40${unit}`;
},
},