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

Fix OSD speed unit preview

This commit is contained in:
Miguel Angel Mulero Martinez 2021-04-08 19:20:04 +02:00
parent 9ece824971
commit 6dee93cecd

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}`;
},
},