Skip to content

Commit

Permalink
use baudrate specific inter frame sleep time in _uart_read function o…
Browse files Browse the repository at this point in the history
…f serial.py, related to #34
  • Loading branch information
brainelectronics committed Dec 28, 2022
1 parent c1e6fd5 commit 9381746
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion umodbus/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def _uart_read(self) -> bytearray:
# variable length function codes may require multiple reads
if self._exit_read(response):
break
time.sleep(0.05)

# wait for the maximum time between two frames
time.sleep(self._t35chars)

return response

Expand Down

0 comments on commit 9381746

Please sign in to comment.