NeoSWSerial icon indicating copy to clipboard operation
NeoSWSerial copied to clipboard

Added explicit TX port and mask selection on write operation.

Open Vasil-Pahomov opened this issue 4 years ago • 0 comments

The case as follows: two instances of NeoSWSerial are engaged. The first works in "listen-only" mode, while the second uses request-reply operation. After calling .listen() on first instance, the second instance does not transmit any data. The problem is that txPort and txBitMask are static variables shared across instances, and in write() function they are not assigned and used from previous call to another port instance. So transmission happen to wrong port. May be the cause of issue https://github.com/SlashDevin/NeoSWSerial/issues/33

Vasil-Pahomov avatar Jul 24 '21 09:07 Vasil-Pahomov