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

Remove hard coded number

This commit is contained in:
Károly Kiripolszky 2020-07-28 01:49:08 +02:00
parent 87f839d168
commit 2071181c9a
3 changed files with 56 additions and 48 deletions

View file

@ -346,8 +346,8 @@ OSD.generateTemperaturePreview = function (osd_data, temperature) {
}
OSD.generateLQPreview = function() {
const CRSF_PROVIDER = 9;
let isXF = FC.RX_CONFIG.serialrx_provider == CRSF_PROVIDER;
const crsfIndex = FC.RX_CONFIG.getSerialRxTypes().findIndex(name => name === 'CRSF');
const isXF = crsfIndex === FC.RX_CONFIG.serialrx_provider;
return FONT.symbol(SYM.LINK_QUALITY) + (isXF ? '2:100' : '8');
}