From d658ce2496999ea5a38a4691f7a21e937cbed825 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 8 Aug 2012 10:44:12 +0100 Subject: small fix for no sats visible --- gpspoller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 gpspoller.py (limited to 'gpspoller.py') diff --git a/gpspoller.py b/gpspoller.py old mode 100644 new mode 100755 index 48105ad..45d0499 --- a/gpspoller.py +++ b/gpspoller.py @@ -58,7 +58,10 @@ class GpsPoller(threading.Thread): print "caught serial error" try: if line[0:6] =='$GPGSV': - self.satellites=string.atoi(datablock[3]) + try: + self.satellites=string.atoi(datablock[3]) + except: + self.satellites=0 if line[0:6] =='$GPGSA': self.fix=string.atoi(datablock[2]) if line[0:6] == '$GPGGA': -- cgit v1.2.3