log GPS state (fix)

pull/71/head
folkert van heusden 2022-08-21 13:41:23 +02:00
rodzic 780ad4ed6e
commit 3f6e01669e
1 zmienionych plików z 13 dodań i 3 usunięć

Wyświetl plik

@ -129,9 +129,19 @@ void loop() {
}
}
bool gps_time_update = gps.time.isUpdated();
bool gps_loc_update = gps.location.isUpdated();
static time_t nextBeaconTimeStamp = -1;
bool gps_time_update = gps.time.isUpdated();
bool gps_loc_update = gps.location.isUpdated();
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_loc_update)
logPrintlnI("GPS fix state went to VALID");
else
logPrintlnI("GPS fix state went to INVALID");
}
static double currentHeading = 0;
static double previousHeading = 0;