1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +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:
Bruce Luckcuck 2019-04-09 14:43:56 -04:00
parent 2b79f2b1a4
commit 64ddbd9924

View file

@ -275,6 +275,9 @@ bool isSerialConfigValid(const serialConfig_t *serialConfigToCheck)
if (portConfig->functionMask & FUNCTION_MSP) { if (portConfig->functionMask & FUNCTION_MSP) {
mspPortCount++; 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); uint8_t bitCount = BITCOUNT(portConfig->functionMask);