Closed leganas closed 5 years ago
There is already a mechanism for doing this that gives you a bit more control.
Take a look at addListener/removeListener
and AbstractSerialTransportListener
.
This will call back when events occur on the serial transport so that you can inject delays etc.
Thanks for the advice, in that case my pull request is redundant
Description of the problem There is a problem when reading the answer on some SerialPort devices. Calling the execute () method causes the reading to fail by mistake "ModbusSerialMaster I/O exception - failed to read response for request"
Proposed Solution Add a delay between sending the request and reading the response
Specifications Version: 2.5.4-SNAPSHOT