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