Skip to content

Commit a117bad

Browse files
authored
Merge pull request #47 from fvzeppelin/master
stability improvements
2 parents 67b8715 + 6f4cd1c commit a117bad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

adafruit_gps.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import time
4646
from micropython import const
4747

48-
__version__ = "0.0.0-auto.0"
48+
__version__ = "3.6.3"
4949
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_GPS.git"
5050

5151

@@ -260,7 +260,7 @@ def _parse_sentence(self):
260260

261261
def _parse_gpgll(self, args):
262262
data = args.split(",")
263-
if data is None or data[0] is None:
263+
if data is None or data[0] is None or (data[0] == ""):
264264
return # Unexpected number of params.
265265

266266
# Parse latitude and longitude.
@@ -295,7 +295,7 @@ def _parse_gprmc(self, args):
295295
# Parse the arguments (everything after data type) for NMEA GPRMC
296296
# minimum location fix sentence.
297297
data = args.split(",")
298-
if data is None or len(data) < 11 or data[0] is None:
298+
if data is None or len(data) < 11 or data[0] is None or (data[0] == ""):
299299
return # Unexpected number of params.
300300
# Parse fix time.
301301
time_utc = int(_parse_float(data[0]))
@@ -374,7 +374,7 @@ def _parse_gpgga(self, args):
374374
# Parse the arguments (everything after data type) for NMEA GPGGA
375375
# 3D location fix sentence.
376376
data = args.split(",")
377-
if data is None or len(data) != 14:
377+
if data is None or len(data) != 14 or (data[0] == ""):
378378
return # Unexpected number of params.
379379
# Parse fix time.
380380
time_utc = int(_parse_float(data[0]))
@@ -421,7 +421,7 @@ def _parse_gpgga(self, args):
421421

422422
def _parse_gpgsa(self, args):
423423
data = args.split(",")
424-
if data is None:
424+
if data is None or (data[0] == ""):
425425
return # Unexpected number of params
426426

427427
# Parse selection mode
@@ -444,7 +444,7 @@ def _parse_gpgsv(self, args):
444444
# Parse the arguments (everything after data type) for NMEA GPGGA
445445
# 3D location fix sentence.
446446
data = args.split(",")
447-
if data is None:
447+
if data is None or (data[0] == ""):
448448
return # Unexpected number of params.
449449

450450
# Parse number of messages

0 commit comments

Comments
 (0)