mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
Change serial port config validation to require MSP on VCP port
Will hopefully reduce the number of cases where users incorrectly disable MSP on the VCP port and then can no longer connect. Should be supplemented with changes to the configurator that prevents turning off MSP on the VCP port.
This commit is contained in:
parent
2b79f2b1a4
commit
64ddbd9924
1 changed files with 3 additions and 0 deletions
|
@ -275,6 +275,9 @@ bool isSerialConfigValid(const serialConfig_t *serialConfigToCheck)
|
|||
|
||||
if (portConfig->functionMask & FUNCTION_MSP) {
|
||||
mspPortCount++;
|
||||
} else if (portConfig->identifier == SERIAL_PORT_USB_VCP) {
|
||||
// Require MSP to be enabled for the VCP port
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t bitCount = BITCOUNT(portConfig->functionMask);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue