mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 09:45:28 +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:
parent
a6bd1fda6f
commit
d2089cbcdf
1 changed files with 8 additions and 0 deletions
|
@ -132,6 +132,8 @@ TABS.ports.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
$(".tab-ports").addClass("supported");
|
$(".tab-ports").addClass("supported");
|
||||||
|
|
||||||
|
const VCP_PORT_IDENTIFIER = 20;
|
||||||
|
|
||||||
var portIdentifierToNameMapping = {
|
var portIdentifierToNameMapping = {
|
||||||
0: 'UART1',
|
0: 'UART1',
|
||||||
1: 'UART2',
|
1: 'UART2',
|
||||||
|
@ -230,6 +232,12 @@ TABS.ports.initialize = function (callback, scrollPosition) {
|
||||||
checkbox_e.prop("checked", true);
|
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 {
|
} else {
|
||||||
var selectElementName = 'function-' + column;
|
var selectElementName = 'function-' + column;
|
||||||
var selectElementSelector = 'select[name=' + selectElementName + ']';
|
var selectElementSelector = 'select[name=' + selectElementName + ']';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue