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

+52
View File
@@ -7,6 +7,7 @@ Since version 1.18 meshcore companion radio firmware has a CLI interface, which
- [Configuration](#configuration)
- [System](#system)
- [Radio](#radio)
- [GPS](#gps)
- [BLE](#ble)
- [Wifi](#wifi)
- [UI](#ui)
@@ -119,6 +120,57 @@ Radio parameters are common to all roles and handled by `CommonRadioPrefs`.
---
### GPS
#### 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:**
- `state`: `on`|`off`
---
#### 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.
---
#### Sync this node's clock with GPS time
**Usage:**
- `gps sync`
---
#### View GPS diagnostics
**Usage:**
- `gps diag`
---
#### View or change this node's rx boosted gain mode (SX12xx and LR1110)
**Usage:**
- `get radio.rxgain`