Skip to content

Commit

Permalink
Fix displays showing "GPS Not Present" until first lock
Browse files Browse the repository at this point in the history
meshtastic#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 committed Nov 3, 2024
1 parent bee474e commit 6bda6aa
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 6bda6aa

Please sign in to comment.