GPS PowerSaving v2: Added GPS wake up upon telemtry requests for companions. Bug fixes for "gps" CLI.

This commit is contained in:
Kevin Le
2026-09-25 22:37:04 +07:00
parent d9c42964eb
commit 1aa8ae90fb
16 changed files with 177 additions and 201 deletions
+8 -5
View File
@@ -65,6 +65,12 @@ void setup() {
external_watchdog.begin();
#endif
#if defined(MESH_DEBUG) && defined(NRF52_PLATFORM)
// give some extra time for serial to settle so
// boot debug messages can be seen on terminal
delay(5000);
#endif
#ifdef DISPLAY_CLASS
if (display.begin()) {
display.startFrame();
@@ -112,12 +118,9 @@ void setup() {
#if ENV_INCLUDE_GPS == 1
// Apply PowerSaving profile for GPS
if (sensors.getLocationProvider() != NULL) {
// Let CLI "gps on" call setSettingValue to enable the PowerSaving mode
// sensors.powersaving_enabled = true;
// sensors.getLocationProvider()->enablePowerSaving(true);
// GPS on and off duration in seconds
sensors.getLocationProvider()->setPowerSavingProfile(600, 86400); // Max 10 minutes, 1 day
sensors.getLocationProvider()->setPowerSavingProfile(the_mesh.getNodePrefs()->powersaving_enabled, 600,
86400); // Max 10 minutes, 1 day
}
#endif