Update gps_client.py add if session valid

pi-sensors-auto-gps
Alan Johnston 4 days ago committed by GitHub
parent 921737ff6e
commit 5797a0734a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -27,9 +27,9 @@ try:
while (session.read() == 0) and ((time.perf_counter() - start) < 2) and (mode < 3):
# print(gps.MODE_SET)
# print(session.valid)
if not (gps.MODE_SET & session.valid):
if (session.valid):
# not useful, probably not a TPV message
continue
# continue
# print('Mode: %s(%d) Time: ' %
# (("Invalid", "NO_FIX", "2D", "3D")[session.fix.mode],

Loading…
Cancel
Save

Powered by TurnKey Linux.