kopia lustrzana https://github.com/inmcm/micropyGPS
Made GPVTG parse cleanly even if sentence is empty.
rodzic
7024c27cea
commit
200b269505
|
@ -333,8 +333,8 @@ class MicropyGPS(object):
|
||||||
def gpvtg(self):
|
def gpvtg(self):
|
||||||
"""Parse Track Made Good and Ground Speed (VTG) Sentence. Updates speed and course"""
|
"""Parse Track Made Good and Ground Speed (VTG) Sentence. Updates speed and course"""
|
||||||
try:
|
try:
|
||||||
course = float(self.gps_segments[1])
|
course = float(self.gps_segments[1]) if self.gps_segments[1] else 0.0
|
||||||
spd_knt = float(self.gps_segments[5])
|
spd_knt = float(self.gps_segments[5]) if self.gps_segments[5] else 0.0
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue