GPS PowerSaving v1.1: Added support for BLE companions

This commit is contained in:
Kevin Le committed 2026-07-20 16:19:27 +07:00
1 parent 38509583fa
commit a7a4e52947
7 files changed
+85 -45

No files matched your search

+12
View File
@@ -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);