mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +03:00
Merge pull request #3056 from SteveCEvans/msp_dp
Add OSD (MSP Displayport) option to port peripherals
This commit is contained in:
commit
c3a81ca438
3 changed files with 9 additions and 0 deletions
|
@ -1630,6 +1630,9 @@
|
||||||
"portsFunction_VTX_MSP": {
|
"portsFunction_VTX_MSP": {
|
||||||
"message": "VTX (MSP)"
|
"message": "VTX (MSP)"
|
||||||
},
|
},
|
||||||
|
"portsFunction_MSP_DISPLAYPORT": {
|
||||||
|
"message": "OSD (MSP Displayport)"
|
||||||
|
},
|
||||||
"pidTuningProfileOption": {
|
"pidTuningProfileOption": {
|
||||||
"message": "Profile $1"
|
"message": "Profile $1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -34,6 +34,7 @@ function MspHelper() {
|
||||||
'LIDAR_TF': 15,
|
'LIDAR_TF': 15,
|
||||||
'FRSKY_OSD': 16,
|
'FRSKY_OSD': 16,
|
||||||
'VTX_MSP': 17,
|
'VTX_MSP': 17,
|
||||||
|
'MSP_DISPLAYPORT': 18,
|
||||||
};
|
};
|
||||||
|
|
||||||
self.REBOOT_TYPES = {
|
self.REBOOT_TYPES = {
|
||||||
|
@ -2922,6 +2923,7 @@ MspHelper.prototype.serialPortFunctionsToMask = function(functions) {
|
||||||
mask = bit_set(mask, bitIndex);
|
mask = bit_set(mask, bitIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mask;
|
return mask;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,10 @@ ports.initialize = function (callback) {
|
||||||
functionRules.push({ name: 'VTX_MSP', groups: ['peripherals'], maxPorts: 1 });
|
functionRules.push({ name: 'VTX_MSP', groups: ['peripherals'], maxPorts: 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) {
|
||||||
|
functionRules.push({ name: 'MSP_DISPLAYPORT', groups: ['peripherals'], maxPorts: 1 });
|
||||||
|
}
|
||||||
|
|
||||||
for (const rule of functionRules) {
|
for (const rule of functionRules) {
|
||||||
rule.displayName = i18n.getMessage(`portsFunction_${rule.name}`);
|
rule.displayName = i18n.getMessage(`portsFunction_${rule.name}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue