Skip to content

Commit

Permalink
Fix GPS state validity logging
Browse files Browse the repository at this point in the history
  • Loading branch information
OK2MOP committed Feb 15, 2023
1 parent f10229b commit 78edc34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LoRa_APRS_Tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ void loop() {
static bool gps_loc_update_valid = false;
static time_t nextBeaconTimeStamp = -1;

if (gps_loc_update != gps_loc_update_valid) {
gps_loc_update_valid = gps_loc_update;
if (gps.location.isValid() != gps_loc_update_valid) {
gps_loc_update_valid = gps.location.isValid();

if (gps_loc_update) {
if (gps_loc_update_valid) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Loop", "GPS fix state went to VALID");
} else {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Loop", "GPS fix state went to INVALID");
Expand Down

0 comments on commit 78edc34

Please sign in to comment.