From 1bec23b6bbfc178c8cab8bb0c0682ff0fee40ac5 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Sun, 3 Nov 2024 20:19:15 +0800 Subject: [PATCH] Fix displays showing "GPS Not Present" until first lock (#5229) https://github.com/meshtastic/firmware/pull/5160 introduced a change which made first publication of GPS information take up to 15mins. For that initial period, displays would show "No GPS Present", even if one was detected. This change fixes that bug, triggering publication immediately after a GPS module is detected. --- src/gps/GPS.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 60d9e8b24..af3c8950e 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -447,10 +447,12 @@ bool GPS::setup() } } } - return false; + } + if (gnssModel != GNSS_MODEL_UNKNOWN) { + setConnected(); } else { - gnssModel = GNSS_MODEL_UNKNOWN; + return false; } if (gnssModel == GNSS_MODEL_MTK) { @@ -1009,6 +1011,7 @@ int32_t GPS::runOnce() } } GPSInitFinished = true; + publishUpdate(); } // Repeaters have no need for GPS