Adds RC Channels element to the OSD

10.7.0-preview
Miguel Angel Mulero Martinez 2019-11-13 08:44:04 +01:00
parent 8297af9c21
commit 2a79f7e612
2 changed files with 22 additions and 1 deletions

View File

@ -4802,6 +4802,13 @@
"osdDescStatMinRssiDbm": {
"message": "Minimum RSSI dBm value"
},
"osdTextElementRcChannels": {
"message": "RC Channels",
"description": "One of the statistics that can be shown at the end of the flight in the OSD"
},
"osdDescElementRcChannels": {
"message": "Display at most 4 channels values. The channels must be specified with the CLI variable 'osd_rcchannels'"
},
"osdTextStatUnknown": {
"message": "Unknown $1",
"description": "One of the statistics that can be shown at the end of the flight in the OSD"

View File

@ -1072,6 +1072,15 @@ OSD.loadDisplayFields = function() {
positionable: true,
preview: FONT.symbol(SYM.RSSI) + '-130'
},
RC_CHANNELS: {
name: 'OSD_RC_CHANNELS',
text: 'osdTextElementRcChannels',
desc: 'osdDescElementRcChannels',
default_position: -1,
draw_order: 395,
positionable: true,
preview: [ "-1000", " 545", " 689", " 1000"],
},
};
};
@ -1469,8 +1478,13 @@ OSD.chooseFields = function () {
F.RATE_PROFILE_NAME,
F.PID_PROFILE_NAME,
F.OSD_PROFILE_NAME,
F.RSSI_DBM_VALUE
F.RSSI_DBM_VALUE,
]);
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
OSD.constants.DISPLAY_FIELDS = OSD.constants.DISPLAY_FIELDS.concat([
F.RC_CHANNELS,
]);
}
}
}
}