1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-25 01:05:15 +03:00

Fixed OSD element display, added missing elements.

This commit is contained in:
mikeller 2018-12-06 01:01:25 +13:00
parent 5e9f34159c
commit 57cf08e0ce
2 changed files with 47 additions and 6 deletions

View file

@ -801,6 +801,17 @@ OSD.constants = {
positionable: true,
preview: '1.0G'
},
MOTOR_DIAG: {
name: 'MOTOR_DIAG',
desc: 'osdDescElementMotorDiag',
default_position: -1,
draw_order: 325,
positionable: true,
preview: FONT.symbol(0x84)
+ FONT.symbol(0x85)
+ FONT.symbol(0x84)
+ FONT.symbol(0x83)
},
LOG_STATUS: {
name: 'LOG_STATUS',
desc: 'osdDescElementLogStatus',
@ -817,6 +828,24 @@ OSD.constants = {
positionable: true,
preview: FONT.symbol(SYM.ARROW_EAST)
},
LINK_QUALITY: {
name: 'LINK_QUALITY',
desc: 'osdDescElementLinkQuality',
default_position: -1,
draw_order: 350,
positionable: true,
preview: '8'
},
TOTAL_DIST: {
name: 'TOTAL_DIST',
desc: 'osdDescElementTotalDist',
default_position: -1,
draw_order: 360,
positionable: true,
preview: function(osd_data) {
return '653' + FONT.symbol(osd_data.unit_mode === 0 ? SYM.FEET : SYM.METRE);
}
},
},
UNKNOWN_DISPLAY_FIELD: {
name: 'UNKNOWN_',
@ -1046,13 +1075,16 @@ OSD.chooseFields = function () {
if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([
F.G_FORCE,
F.LOG_STATUS,
]);
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([
F.FLIP_ARROW,
]);
if (semver.gte(CONFIG.apiVersion, "1.41.0")) {
OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([
F.MOTOR_DIAG,
F.LOG_STATUS,
F.FLIP_ARROW,
F.LINK_QUALITY,
F.TOTAL_DIST,
]);
}
}
}
}
}