mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Fix findSerialPortIndexByIdentifier() function
This commit is contained in:
parent
b4c777e2a0
commit
519c3d243b
1 changed files with 1 additions and 2 deletions
|
@ -110,8 +110,7 @@ baudRate_e lookupBaudRateIndex(uint32_t baudRate)
|
|||
int findSerialPortIndexByIdentifier(serialPortIdentifier_e identifier)
|
||||
{
|
||||
for (int index = 0; index < SERIAL_PORT_COUNT; index++) {
|
||||
const serialPortUsage_t *candidate = &serialPortUsageList[index];
|
||||
if (candidate->identifier == identifier) {
|
||||
if (serialPortIdentifiers[index] == identifier) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue