mirror of
https://github.com/meshtastic/firmware.git
synced 2026-02-01 11:11:11 -05:00
Log cleanups (#5135)
* Log cleanups change log levels, shorten log messages, delete commented out logs * Address comments from review * Remove full stops * EDEBUG --> DEBUG
This commit is contained in:
@@ -351,7 +351,7 @@ void PositionModule::sendOurPosition(NodeNum dest, bool wantReplies, uint8_t cha
|
||||
if (IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_TRACKER,
|
||||
meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) &&
|
||||
config.power.is_power_saving) {
|
||||
LOG_DEBUG("Starting next execution in 5 seconds and then going to sleep.");
|
||||
LOG_DEBUG("Starting next execution in 5s, then going to sleep");
|
||||
sleepOnNextExecution = true;
|
||||
setIntervalFromNow(5000);
|
||||
}
|
||||
@@ -364,7 +364,7 @@ int32_t PositionModule::runOnce()
|
||||
if (sleepOnNextExecution == true) {
|
||||
sleepOnNextExecution = false;
|
||||
uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(config.position.position_broadcast_secs);
|
||||
LOG_DEBUG("Sleeping for %ims, then awaking to send position again.", nightyNightMs);
|
||||
LOG_DEBUG("Sleeping for %ims, then awaking to send position again", nightyNightMs);
|
||||
doDeepSleep(nightyNightMs, false);
|
||||
}
|
||||
|
||||
@@ -449,23 +449,6 @@ struct SmartPosition PositionModule::getDistanceTraveledSinceLastSend(meshtastic
|
||||
float distanceTraveledSinceLastSend = GeoCoord::latLongToMeter(
|
||||
lastGpsLatitude * 1e-7, lastGpsLongitude * 1e-7, currentPosition.latitude_i * 1e-7, currentPosition.longitude_i * 1e-7);
|
||||
|
||||
#ifdef GPS_EXTRAVERBOSE
|
||||
LOG_DEBUG("--------LAST POSITION------------------------------------");
|
||||
LOG_DEBUG("lastGpsLatitude=%i, lastGpsLatitude=%i", lastGpsLatitude, lastGpsLongitude);
|
||||
|
||||
LOG_DEBUG("--------CURRENT POSITION---------------------------------");
|
||||
LOG_DEBUG("currentPosition.latitude_i=%i, currentPosition.longitude_i=%i", lastGpsLatitude, lastGpsLongitude);
|
||||
|
||||
LOG_DEBUG("--------SMART POSITION-----------------------------------");
|
||||
LOG_DEBUG("hasTraveledOverThreshold=%i, distanceTraveled=%f, distanceThreshold=%f",
|
||||
abs(distanceTraveledSinceLastSend) >= distanceTravelThreshold, abs(distanceTraveledSinceLastSend),
|
||||
distanceTravelThreshold);
|
||||
|
||||
if (abs(distanceTraveledSinceLastSend) >= distanceTravelThreshold) {
|
||||
LOG_DEBUG("SMART SEEEEEEEEENDING");
|
||||
}
|
||||
#endif
|
||||
|
||||
return SmartPosition{.distanceTraveled = abs(distanceTraveledSinceLastSend),
|
||||
.distanceThreshold = distanceTravelThreshold,
|
||||
.hasTraveledOverThreshold = abs(distanceTraveledSinceLastSend) >= distanceTravelThreshold};
|
||||
@@ -495,4 +478,4 @@ void PositionModule::handleNewPosition()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user