mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-25 09:13:35 +00:00
Sync repeater GPS weekly in power saving mode
This commit is contained in:
@@ -4302,6 +4302,11 @@ The GPS must be enabled. When GPS power saving has put an enabled receiver to
|
||||
sleep, this command schedules a sync and wakes it; after `set gps off`, it reports
|
||||
`gps is off` without scheduling work.
|
||||
|
||||
On repeaters with device power saving enabled, the automatic GPS cycle wakes
|
||||
for up to 10 minutes and repeats seven days after GPS sleeps. A valid GPS time
|
||||
can correct the RTC either forward or backward. With device power saving off,
|
||||
an enabled GPS refreshes the RTC every 30 minutes.
|
||||
|
||||
---
|
||||
|
||||
#### Set this node's location based on the GPS coordinates
|
||||
|
||||
@@ -51,6 +51,12 @@ the next request can return that fix without another wake. `gps off` also
|
||||
cancels an acquisition already in progress. An acquisition that never obtains a
|
||||
fix retains the normal 15-minute safety timeout.
|
||||
|
||||
When GPS and device power saving are both enabled, a repeater wakes GPS for up
|
||||
to 10 minutes to obtain a valid time and then sleeps it for seven days. A valid
|
||||
GPS time may correct the RTC either forward or backward. With device power
|
||||
saving off, an enabled GPS remains active and refreshes the RTC every 30
|
||||
minutes.
|
||||
|
||||
## Companion/Client Nodes
|
||||
|
||||
Companion/client telemetry uses the existing companion telemetry permission
|
||||
|
||||
@@ -208,8 +208,9 @@ void setup() {
|
||||
// the receiver only until the first valid fix has been cached.
|
||||
sensors.setGpsTelemetryStopAfterFix(true);
|
||||
if (sensors.getLocationProvider() != NULL) {
|
||||
// Keep GPS awake for at most 10 minutes, then asleep for one day.
|
||||
sensors.getLocationProvider()->setPowerSavingProfile(600, 86400);
|
||||
// Keep GPS awake for at most 10 minutes, then asleep for one week.
|
||||
sensors.getLocationProvider()->setPowerSavingProfile(
|
||||
10UL * 60UL, 7UL * 24UL * 60UL * 60UL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user