From f965097f551fec762bc3b9264d48b28ea79e19fc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 14 Dec 2025 08:19:48 -0500 Subject: [PATCH] Update gps_client.py make fail -1 0 0 0 --- gps_client.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gps_client.py b/gps_client.py index d33c8fde..66ba8c51 100644 --- a/gps_client.py +++ b/gps_client.py @@ -11,13 +11,13 @@ run this way: python3 example1.py.txt import gps # the gpsd interface module import time -mode = -1 -lat = 0 -lon = 0 -alt = 0 - try: - + + mode = -1 + lat = 0 + lon = 0 + alt = 0 + session = gps.gps(mode=gps.WATCH_ENABLE) start = time.perf_counter() @@ -64,6 +64,6 @@ try: exit(0) except: - print("%d %.6f %.6f %.1f" % (mode, lat, lon, alt)) + print("-1 0 0 0) exit(0)