gps: cache the last fix in LocationProvider (isValid vs hasValidFix), fix and status commands

This commit is contained in:
Florent committed 2026-11-08 08:47:34 -04:00
1 parent dea38936d7
commit e58be9ab11
6 files changed
+208 -33

No files matched your search

+33 -4
View File
@@ -999,9 +999,16 @@ region save
---
### GPS (When GPS support is compiled in)
#### View or change GPS state
#### View GPS state
**Usage:**
- `gps`
**Note:** Reports the requested state, receiver activity, last-fix status (last fix gives number of sats and how long ago was the fix), and mode. In periodic mode, `waiting` means the receiver is off between acquisitions; the last fix remains available. `off(hw)` means a hardware GPS switch is off.
---
#### Change GPS state
**Usage:**
- `gps <state>`
**Parameters:**
@@ -1009,9 +1016,25 @@ region save
**Default:** `off`
**Note:** Output format:
- `off` when the GPS hardware is disabled
- `on, {active|deactivated}, {fix|no fix}, {sat count} sats` when the GPS hardware is enabled
---
#### View or change the GPS acquisition period
**Usage:**
- `gps period`
- `gps period <seconds>`
**Parameters:**
- `seconds`: `0` for continuous tracking, or `1`-`86400` for periodic acquisition
**Note:** A periodic acquisition stops after receiving a valid fix, then resumes after the configured period.
---
#### View the last GPS fix
**Usage:**
- `gps fix`
**Note:** Returns the last valid latitude, longitude, altitude, and elapsed time since the fix. Returns `no fix` until a valid fix is received.
---
@@ -1021,6 +1044,12 @@ region save
---
#### View GPS diagnostics
**Usage:**
- `gps diag`
---
#### Set this node's location based on the GPS coordinates
**Usage:**
- `gps setloc`