Merge pull request #7953 from etracer65/require_msp_on_vcp_port

Change serial port config validation to require MSP on VCP port
This commit is contained in:
Michael Keller 2019-04-14 21:50:46 +12:00 committed by GitHub
commit 3cc7165cc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

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);