mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-23 16:52:22 +00:00
GPS PowerSaving v1.1: Added support for BLE companions
This commit is contained in:
1 parent
38509583fa
commit
a7a4e52947
7 files changed
+85
-45
No files matched your search
@@ -87,6 +87,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