Skip to content

Commit 9381746

Browse files
use baudrate specific inter frame sleep time in _uart_read function of serial.py, related to #34
1 parent c1e6fd5 commit 9381746

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

umodbus/serial.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ def _uart_read(self) -> bytearray:
173173
# variable length function codes may require multiple reads
174174
if self._exit_read(response):
175175
break
176-
time.sleep(0.05)
176+
177+
# wait for the maximum time between two frames
178+
time.sleep(self._t35chars)
177179

178180
return response
179181

0 commit comments

Comments
 (0)