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

Merge pull request #1353 from etracer65/force_msp_on_vcp

Prevent disabling MSP for VCP port
This commit is contained in:
Michael Keller 2019-04-15 11:39:22 +12:00 committed by GitHub
commit 894961cef5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,6 +132,8 @@ TABS.ports.initialize = function (callback, scrollPosition) {
$(".tab-ports").addClass("supported");
const VCP_PORT_IDENTIFIER = 20;
var portIdentifierToNameMapping = {
0: 'UART1',
1: 'UART2',
@ -230,6 +232,12 @@ TABS.ports.initialize = function (callback, scrollPosition) {
checkbox_e.prop("checked", true);
}
if (serialPort.identifier == VCP_PORT_IDENTIFIER && functionName == "MSP") {
var checkbox_e = functions_e.find('#' + checkboxId);
checkbox_e.prop("checked", true);
checkbox_e.prop("disabled", true);
}
} else {
var selectElementName = 'function-' + column;
var selectElementSelector = 'select[name=' + selectElementName + ']';