mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
Fixed copy / pasta bug, changed to checko only TX pin assignment.
This commit is contained in:
parent
2b2229fe61
commit
a33cc7d038
1 changed files with 5 additions and 10 deletions
|
@ -438,20 +438,15 @@ void serialInit(bool softserialEnabled, serialPortIdentifier_e serialPortToDisab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL1
|
if ((serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL1
|
||||||
#ifdef USE_SOFTSERIAL1
|
#ifdef USE_SOFTSERIAL1
|
||||||
&& !(softserialEnabled && serialPinConfig()->ioTagRx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1] && serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1])
|
&& !(softserialEnabled && serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1])
|
||||||
#endif
|
#endif
|
||||||
) {
|
) || (serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL2
|
||||||
serialPortUsageList[index].identifier = SERIAL_PORT_NONE;
|
|
||||||
serialPortCount--;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL2
|
|
||||||
#ifdef USE_SOFTSERIAL2
|
#ifdef USE_SOFTSERIAL2
|
||||||
&& !(softserialEnabled && serialPinConfig()->ioTagRx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1] && serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1])
|
&& !(softserialEnabled && serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL2])
|
||||||
#endif
|
#endif
|
||||||
) {
|
)) {
|
||||||
serialPortUsageList[index].identifier = SERIAL_PORT_NONE;
|
serialPortUsageList[index].identifier = SERIAL_PORT_NONE;
|
||||||
serialPortCount--;
|
serialPortCount--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue