Replaced all of the logging with proper log levels

This commit is contained in:
Ben Meadors
2022-12-30 10:27:07 -06:00
parent 8193215294
commit f1cdfd163d
68 changed files with 519 additions and 524 deletions

View File

@@ -361,7 +361,7 @@ void GPS::setNumSatellites(uint8_t n)
void GPS::setAwake(bool on)
{
if (!wakeAllowed && on) {
LOG_DEBUG("Inhibiting because !wakeAllowed\n");
LOG_WARN("Inhibiting because !wakeAllowed\n");
on = false;
}
@@ -516,7 +516,7 @@ void GPS::forceWake(bool on)
/// Prepare the GPS for the cpu entering deep or light sleep, expect to be gone for at least 100s of msecs
int GPS::prepareSleep(void *unused)
{
LOG_DEBUG("GPS prepare sleep!\n");
LOG_INFO("GPS prepare sleep!\n");
forceWake(false);
return 0;
@@ -525,7 +525,7 @@ int GPS::prepareSleep(void *unused)
/// Prepare the GPS for the cpu entering deep or light sleep, expect to be gone for at least 100s of msecs
int GPS::prepareDeepSleep(void *unused)
{
LOG_DEBUG("GPS deep sleep!\n");
LOG_INFO("GPS deep sleep!\n");
// For deep sleep we also want abandon any lock attempts (because we want minimum power)
getSleepTime();
@@ -568,7 +568,7 @@ GnssModel_t GPS::probe()
if(index != -1){
ver = ver.substring(index);
if (ver.startsWith("$GPTXT,01,01,02")) {
LOG_DEBUG("L76K GNSS init succeeded, using L76K GNSS Module\n");
LOG_INFO("L76K GNSS init succeeded, using L76K GNSS Module\n");
return GNSS_MODEL_MTK;
}
}
@@ -631,9 +631,9 @@ GnssModel_t GPS::probe()
}
if (strlen((char*)buffer)) {
LOG_DEBUG("UBlox GNSS init succeeded, using UBlox %s GNSS Module\n" , buffer);
LOG_INFO("UBlox GNSS init succeeded, using UBlox %s GNSS Module\n" , buffer);
}else{
LOG_DEBUG("UBlox GNSS init succeeded, using UBlox GNSS Module\n");
LOG_INFO("UBlox GNSS init succeeded, using UBlox GNSS Module\n");
}
return GNSS_MODEL_UBLOX;

View File

@@ -137,7 +137,7 @@ bool NMEAGPS::lookForLocation()
(reader.time.age() < GPS_SOL_EXPIRY_MS) &&
(reader.date.age() < GPS_SOL_EXPIRY_MS)))
{
LOG_DEBUG("SOME data is TOO OLD: LOC %u, TIME %u, DATE %u\n", reader.location.age(), reader.time.age(), reader.date.age());
LOG_WARN("SOME data is TOO OLD: LOC %u, TIME %u, DATE %u\n", reader.location.age(), reader.time.age(), reader.date.age());
return false;
}
@@ -212,7 +212,7 @@ bool NMEAGPS::lookForLocation()
if (reader.course.value() < 36000) { // sanity check
p.ground_track = reader.course.value() * 1e3; // Scale the heading (in degrees * 10^-2) to match the expected degrees * 10^-5
} else {
LOG_DEBUG("BOGUS course.value() REJECTED: %d\n",
LOG_WARN("BOGUS course.value() REJECTED: %d\n",
reader.course.value());
}
}