Skip to content

Commit

Permalink
Fix displays showing "GPS Not Present" until first lock (#5229)
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
fifieldt authored and caveman99 committed Nov 3, 2024
1 parent 3a8a225 commit 68c825e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gps/GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -1009,6 +1011,7 @@ int32_t GPS::runOnce()
}
}
GPSInitFinished = true;
publishUpdate();
}

// Repeaters have no need for GPS
Expand Down

0 comments on commit 68c825e

Please sign in to comment.