From 78edc343bd5a0c71e548097af167134ef25039cd Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Wed, 15 Feb 2023 15:48:41 +0100 Subject: [PATCH] Fix GPS state validity logging --- src/LoRa_APRS_Tracker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LoRa_APRS_Tracker.cpp b/src/LoRa_APRS_Tracker.cpp index e399108..edd94df 100644 --- a/src/LoRa_APRS_Tracker.cpp +++ b/src/LoRa_APRS_Tracker.cpp @@ -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");