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

Prevent disabling MSP for VCP port

Forces MSP to be enabled and deactivates the control to prevent disabling.
This commit is contained in:
Bruce Luckcuck 2019-04-09 17:32:20 -04:00
parent a6bd1fda6f
commit d2089cbcdf

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 + ']';