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

Merge pull request #1292 from mikeller/fix_temperature_symbols

Fixed incorrect temperature symbols.
This commit is contained in:
Michael Keller 2019-02-11 22:17:01 +13:00 committed by GitHub
commit feaaf0d61a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,7 @@ SYM.HEADING_N = 0x18;
SYM.HEADING_S = 0x19;
SYM.HEADING_E = 0x1A;
SYM.HEADING_W = 0x1B;
SYM.TEMP_F = 0x0D;
SYM.TEMP_C = 0x0E;
SYM.STICK_OVERLAY_SPRITE_HIGH = 0x08;
SYM.STICK_OVERLAY_SPRITE_MID = 0x09;
@ -292,10 +293,10 @@ OSD.generateTemperaturePreview = function (osd_data, temperature) {
case 0:
temperature *= (9.0 / 5.0);
temperature += 32.0;
preview += Math.floor(temperature) + 'F'
preview += Math.floor(temperature) + FONT.symbol(SYM.TEMP_F);
break;
case 1:
preview += temperature + 'C'
preview += temperature + FONT.symbol(SYM.TEMP_C);
break;
}
return preview;