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

initial commit to fix PR

haslinghuis comment inc

comments inc

haslinghuis comment inc

Revert "haslinghuis comment inc"

This reverts commit cbe38ff353cacc041dc1f88bbe59780b9982f9d0.

Update src/js/tabs/osd.js

Co-authored-by: haslinghuis <mark@numloq.nl>

Update src/js/tabs/osd.js

Co-authored-by: haslinghuis <mark@numloq.nl>

clean

clean

fix

clean
This commit is contained in:
p-i-engineer 2022-06-28 12:01:05 -07:00
parent e228ca00e0
commit e17cf1ae68
2 changed files with 30 additions and 1 deletions

View file

@ -306,6 +306,21 @@ OSD.generateAltitudePreview = function(osdData) {
return `${FONT.symbol(SYM.ALTITUDE)}399${variantSelected === 0? '.7' : ''}${unit}`;
};
OSD.generateVTXChannelPreview = function(osdData) {
const variantSelected = OSD.getVariantForPreview(osdData, 'VTX_CHANNEL');
let value;
switch (variantSelected) {
case 0:
value = 'R:2:200:P';
break;
case 1:
value = '200';
break;
}
return value;
};
OSD.generateBatteryUsagePreview = function(osdData) {
const variantSelected = OSD.getVariantForPreview(osdData, 'MAIN_BATT_USAGE');
@ -565,7 +580,13 @@ OSD.loadDisplayFields = function() {
defaultPosition: 1,
draw_order: 120,
positionable: true,
preview: 'R:2:200:P',
variants: [
'osdTextElementVTXchannelVariantFull',
'osdTextElementVTXchannelVariantPower',
],
preview(osdData) {
return OSD.generateVTXChannelPreview(osdData);
},
},
VOLTAGE_WARNING: {
name: 'VOLTAGE_WARNING',