From a33cc7d038c21a2dfd63c9ebdf7e312959f3d98d Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Thu, 9 Mar 2017 17:51:08 +1300 Subject: [PATCH] Fixed copy / pasta bug, changed to checko only TX pin assignment. --- src/main/io/serial.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main/io/serial.c b/src/main/io/serial.c index 4d0a88c4e..acb354c72 100644 --- a/src/main/io/serial.c +++ b/src/main/io/serial.c @@ -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 - && !(softserialEnabled && serialPinConfig()->ioTagRx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1] && serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1]) + && !(softserialEnabled && serialPinConfig()->ioTagTx[RESOURCE_SOFT_OFFSET + SOFTSERIAL1]) #endif - ) { - serialPortUsageList[index].identifier = SERIAL_PORT_NONE; - serialPortCount--; - } - - if (serialPortUsageList[index].identifier == SERIAL_PORT_SOFTSERIAL2 + ) || (serialPortUsageList[index].identifier == SERIAL_PORT_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 - ) { + )) { serialPortUsageList[index].identifier = SERIAL_PORT_NONE; serialPortCount--; }