From 0f2133e6fc05b87e82ba95cb6fbf94ee5c753ad3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 14 Dec 2025 15:34:05 -0500 Subject: [PATCH] Update gps_client.py add session.waiting --- gps_client.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gps_client.py b/gps_client.py index 3051da1c..ec34f89e 100644 --- a/gps_client.py +++ b/gps_client.py @@ -21,9 +21,13 @@ try: session = gps.gps(mode=gps.WATCH_ENABLE) start = time.perf_counter() - + try: - while (session.read() == 0) and ((time.perf_counter() - start) < 2) and (mode < 2): +# while (session.read() == 0) and ((time.perf_counter() - start) < 2) and (mode < 2): + while ((time.perf_counter() - start) < 2) and (mode < 2): + if session.waiting(2.0): + session.read() + # print(gps.MODE_SET) # print(session.valid) if (session.valid):