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
committerYves Fischer <yvesf-git@xapek.org>2017-01-03 21:14:50 +0100
commite3494d280fd6e2db591ea40c4365cdf18524fbdc (patch)
tree2811407c3c2049d462f47df8020da53e12affe35 /usv_driver.py
parent8d6ccf54a7c1e763e016a82bdce31a19ed94a444 (diff)
downloadusv_tools-e3494d280fd6e2db591ea40c4365cdf18524fbdc.tar.gz
usv_tools-e3494d280fd6e2db591ea40c4365cdf18524fbdc.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")