GPS: first fix timeout as a saved setting (gps firstfix), 1 h by default

A cold start can take up to ~30 min with a weak sky view, so the default
limit before the first fix since boot goes from 15 min to 1 h.

The limit is now a GPS preference, set with `gps firstfix <duration>`
(0 = no limit, at most 1 day) and saved with the other GPS settings, so
repeaters and companions can use different values without a rebuild.
GPS_FIRST_FIX_TIMEOUT_MS stays as the build default.
This commit is contained in:
Olexandr Tyshchenko committed 2026-11-13 14:29:02 +02:00
1 parent be9d278a96
commit 407cb9abac
7 files changed
+95 -15

No files matched your search

+3
View File
@@ -18,6 +18,9 @@ public:
virtual void setGpsEnabled(bool enabled) = 0;
virtual uint32_t getGpsPeriod() const = 0;
virtual void setGpsPeriod(uint32_t seconds) = 0;
// Saved first-fix timeout in seconds; false = not set, use the build default.
virtual bool getFirstFixTimeout(uint32_t& seconds) const { return false; }
virtual void setFirstFixTimeout(uint32_t seconds) { }
// Reference position for the anti-spoofing guard (GPS_GUARD), e.g. the configured node position.
virtual bool getGuardReference(double& lat, double& lon) const { return false; }