1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Only index into the configurable baud rate list when needed.

This commit is contained in:
Dominic Clifton 2015-03-03 17:30:35 +00:00
parent dca984ff88
commit a156d915f4
10 changed files with 11 additions and 13 deletions

View file

@ -602,7 +602,7 @@ void mspAllocateSerialPorts(serialConfig_t *serialConfig)
continue;
}
serialPort = openSerialPort(portConfig->identifier, FUNCTION_MSP, NULL, portConfig->msp_baudrateIndex, MODE_RXTX, SERIAL_NOT_INVERTED);
serialPort = openSerialPort(portConfig->identifier, FUNCTION_MSP, NULL, baudRates[portConfig->msp_baudrateIndex], MODE_RXTX, SERIAL_NOT_INVERTED);
if (serialPort) {
resetMspPort(mspPort, serialPort, FOR_GENERAL_MSP);
portIndex++;