[OSD] Add support for FrSky OSD

Add peripheral bit definitions to check the port function mask.
Depends on #1851
Depends on #1852
10.7.0-preview
Alberto García Hierro 2020-01-03 16:33:11 +00:00
parent 778e834759
commit 6b2c59b571
3 changed files with 9 additions and 1 deletions

View File

@ -1550,6 +1550,9 @@
"portsFunction_RUNCAM_DEVICE_CONTROL": {
"message": "Camera (RunCam Protocol)"
},
"portsFunction_FRSKY_OSD": {
"message": "OSD (FrSky Protocol)"
},
"pidTuningProfileOption": {
"message": "Profile $1"
},

View File

@ -24,7 +24,8 @@ function MspHelper () {
'TELEMETRY_IBUS': 12,
'IRC_TRAMP': 13,
'RUNCAM_DEVICE_CONTROL': 14, // support communitate with RunCam Device
'LIDAR_TF': 15
'LIDAR_TF': 15,
'FRSKY_OSD': 16,
};
self.REBOOT_TYPES = {

View File

@ -53,6 +53,10 @@ TABS.ports.initialize = function (callback, scrollPosition) {
functionRules.push({ name: 'LIDAR_TF', groups: ['peripherals'], maxPorts: 1 });
}
if (semver.gte(CONFIG.apiVersion, API_VERSION_1_43)) {
functionRules.push({ name: 'FRSKY_OSD', groups: ['peripherals'], maxPorts: 1 });
}
for (var i = 0; i < functionRules.length; i++) {
functionRules[i].displayName = i18n.getMessage('portsFunction_' + functionRules[i].name);
}