Standardize lat/lon position logs (#4156)

* Standardize lat/lon position logs

* Missed sone and condensed logs
This commit is contained in:
Ben Meadors
2024-06-21 17:25:54 -05:00
committed by GitHub
parent 0dd363fa98
commit 02d8715ca0
8 changed files with 30 additions and 12 deletions

View File

@@ -778,6 +778,22 @@ GPS::~GPS()
notifyGPSSleepObserver.observe(&notifyGPSSleep);
}
const char *GPS::powerStateToString()
{
switch (powerState) {
case GPS_OFF:
return "OFF";
case GPS_IDLE:
return "IDLE";
case GPS_STANDBY:
return "STANDBY";
case GPS_ACTIVE:
return "ACTIVE";
default:
return "UNKNOWN";
}
}
void GPS::setGPSPower(bool on, bool standbyOnly, uint32_t sleepTime)
{
// Record the current powerState
@@ -792,7 +808,7 @@ void GPS::setGPSPower(bool on, bool standbyOnly, uint32_t sleepTime)
else
powerState = GPS_OFF;
LOG_DEBUG("GPS::powerState=%d\n", powerState);
LOG_DEBUG("GPS::powerState=%s\n", powerStateToString());
// If the next update is due *really soon*, don't actually power off or enter standby. Just wait it out.
if (!on && powerState == GPS_IDLE)