arduino-libraries / ArduinoModbus

252 stars 120 forks source link

_modbus_rtu_select() chooses insane timeout delays #23

Closed cheetor5923 closed 4 years ago

cheetor5923 commented 4 years ago

For some reason the timeout for a modbus reply ends up being 1 whole second. I'm using a RTOS on my arduino and since this is talking in a timing sensitive manner it has to be wrapped by disabling the scheduler.... problem is this causes everything else to come to a halt for 1 entire second... 1 second is insanely long at 57600bps 2ms is more than enough.....

sandeepmistry commented 4 years ago

Hi @cheetor5923,

Pull request #15 added a setTimeout API, does this fit your needs?

cheetor5923 commented 4 years ago

Hi Sandeep Yes that works nicely. Thanks for pointing that out.