Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/betaflight/betaflight-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaslinghuis <mark@numloq.nl>2022-10-25 13:54:14 +0300
committerGitHub <noreply@github.com>2022-10-25 13:54:14 +0300
commitc3a81ca438d8123ebf3e54b47362d83ce7704af8 (patch)
tree0be826863632f629480fa799f605a373de760db6
parent3c776758a3432d3cb437c199c7ea9bd5c9809c13 (diff)
parentee4284b63ba1c30ede91e54980aa01defdbd37c0 (diff)
Merge pull request #3056 from SteveCEvans/msp_dp
Add OSD (MSP Displayport) option to port peripherals
-rw-r--r--locales/en/messages.json3
-rw-r--r--src/js/msp/MSPHelper.js2
-rw-r--r--src/js/tabs/ports.js4
3 files changed, 9 insertions, 0 deletions
diff --git a/locales/en/messages.json b/locales/en/messages.json
index a9f6ae18..7a9dd49e 100644
--- a/locales/en/messages.json
+++ b/locales/en/messages.json
@@ -1630,6 +1630,9 @@
"portsFunction_VTX_MSP": {
"message": "VTX (MSP)"
},
+ "portsFunction_MSP_DISPLAYPORT": {
+ "message": "OSD (MSP Displayport)"
+ },
"pidTuningProfileOption": {
"message": "Profile $1"
},
diff --git a/src/js/msp/MSPHelper.js b/src/js/msp/MSPHelper.js
index 20abf3f2..3bfa6a6c 100644
--- a/src/js/msp/MSPHelper.js
+++ b/src/js/msp/MSPHelper.js
@@ -34,6 +34,7 @@ function MspHelper() {
'LIDAR_TF': 15,
'FRSKY_OSD': 16,
'VTX_MSP': 17,
+ 'MSP_DISPLAYPORT': 18,
};
self.REBOOT_TYPES = {
@@ -2922,6 +2923,7 @@ MspHelper.prototype.serialPortFunctionsToMask = function(functions) {
mask = bit_set(mask, bitIndex);
}
}
+
return mask;
};
diff --git a/src/js/tabs/ports.js b/src/js/tabs/ports.js
index 21bcde62..71a7d91b 100644
--- a/src/js/tabs/ports.js
+++ b/src/js/tabs/ports.js
@@ -62,6 +62,10 @@ ports.initialize = function (callback) {
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) {
rule.displayName = i18n.getMessage(`portsFunction_${rule.name}`);
}