summaryrefslogtreecommitdiff
path: root/gpspoller.py
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-05-17 20:24:43 +0100
committerTim Redfern <tim@eclectronics.org>2012-05-17 20:24:43 +0100
commitd15a608b4313bea0d24711cc85cc683aefb1f494 (patch)
treeb10ab613c743ace605f299f61fdf01f50fd34ad9 /gpspoller.py
parente5a989f2e65434c02c2ef7b28d6507635d08e9b6 (diff)
time in gps debug
Diffstat (limited to 'gpspoller.py')
-rw-r--r--gpspoller.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/gpspoller.py b/gpspoller.py
index 689ee88..51625f8 100644
--- a/gpspoller.py
+++ b/gpspoller.py
@@ -45,10 +45,14 @@ class GpsPoller(threading.Thread):
self.changed=True
time.sleep(0.5)
else:
- line = self.gps.read(1)
- line = line+self.gps.readline()
- datablock = line.split(',')
- #print line
+ line=""
+ try:
+ line = self.gps.read(1)
+ line = line+self.gps.readline()
+ datablock = line.split(',')
+ #print line
+ except:
+ print "caught serial error"
try:
if line[0:6] =='$GPGSV':
self.satellites=string.atoi(datablock[3])