From 64ddbd99246f985a62ac0bdeca35df9a0718bd98 Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Tue, 9 Apr 2019 14:43:56 -0400 Subject: [PATCH] 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. --- src/main/io/serial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/io/serial.c b/src/main/io/serial.c index a6bcefe129..07678fcacb 100644 --- a/src/main/io/serial.c +++ b/src/main/io/serial.c @@ -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);