Skip to content

Commit

Permalink
Set the write timeout for the serial port
Browse files Browse the repository at this point in the history
Without this, the write can block indefinitely with USB serial ports if the remote device doesn't service the port.
This can occur with Arduinos when large volumnes of data are being sent by the Arduino
  • Loading branch information
WillB97 committed May 18, 2024
1 parent 93f7e02 commit 4fce704
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sbot/serial_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def __init__(
port,
baudrate=baud,
timeout=timeout,
write_timeout=timeout,
do_not_open=True,
)

Expand Down

0 comments on commit 4fce704

Please sign in to comment.