summaryrefslogtreecommitdiff
path: root/usv_driver.py
diff options
context:
space:
mode:
authorJack the Ripper <jack@x4.2.localnet.cc>2015-11-15 10:50:45 +0100
committerJack the Ripper <jack@x4.2.localnet.cc>2015-11-15 10:50:45 +0100
commitb4c39e0ea54791d3c56d9d42b1368bd3dbce5be3 (patch)
tree2811407c3c2049d462f47df8020da53e12affe35 /usv_driver.py
parent8d6ccf54a7c1e763e016a82bdce31a19ed94a444 (diff)
downloadusv_tools-b4c39e0ea54791d3c56d9d42b1368bd3dbce5be3.tar.gz
usv_tools-b4c39e0ea54791d3c56d9d42b1368bd3dbce5be3.zip
- workaround for timeout error
- improved logging - disabled apscheduler in support of a simple sleep()
Diffstat (limited to 'usv_driver.py')
-rwxr-xr-xusv_driver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/usv_driver.py b/usv_driver.py
index c8ba8bc..5cb1167 100755
--- a/usv_driver.py
+++ b/usv_driver.py
@@ -7,7 +7,8 @@ import re
class Usv(object):
def __init__(self, device, baudrate, json_file):
self._serial_port = serial.Serial(device,
- baudrate=baudrate)
+ baudrate=baudrate,
+ timeout=10)
# force a clean prompt
self._serial_port.write(b"\r")