mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-10 08:05:40 +00:00
Applied GPS power saving profile with 10 min on, 1 day off cycle
This commit is contained in:
@@ -106,6 +106,18 @@ void setup() {
|
||||
|
||||
command[0] = 0;
|
||||
|
||||
#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
|
||||
}
|
||||
#endif
|
||||
|
||||
sensors.begin();
|
||||
|
||||
the_mesh.begin(fs);
|
||||
|
||||
Reference in New Issue
Block a user