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:
parent
dca984ff88
commit
a156d915f4
10 changed files with 11 additions and 13 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue