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

+3 -3
View File
@@ -436,9 +436,9 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, char* command, char* re
int sats = l->satellitesCount();
bool active = !strcmp(_sensors->getSettingByKey("gps"), "1");
if (_prefs->powersaving_enabled && l->getGPSPowerSaving()) { // GPS Power Saving
if (_prefs->powersaving_enabled && l->isPowerSavingEnabled()) { // GPS Power Saving
if (enabled) {
unsigned long mins = (l->getNextGPSOff() - millis()) / 60000UL;
unsigned long mins = (l->getNextSleep() - millis()) / 60000UL;
sprintf(reply, "on (powersaving, sleep in %luh %lum), %s, %s, %d sats",
mins / 60UL,
mins % 60UL,
@@ -446,7 +446,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, char* command, char* re
fix ? "fix" : "no fix",
sats);
} else {
unsigned long mins = (l->getNextGPSOn() - millis()) / 60000UL;
unsigned long mins = (l->getNextWake() - millis()) / 60000UL;
sprintf(reply, "off (powersaving, wake in %luh %lum)",
mins / 60UL,
mins % 60UL);