Fix leap seconds handling

pull/54/head
Mikael Nousiainen 2023-08-09 09:13:24 +03:00
rodzic 767c1a2f54
commit 0a2ad591b1
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -712,7 +712,7 @@ bool radio_handle_time_sync()
return false;
}
uint32_t time_millis = gps.time_of_week_millis + (GPS_TIME_LEAP_SECONDS * 1000);
uint32_t time_millis = gps.time_of_week_millis - (GPS_TIME_LEAP_SECONDS * 1000);
if (time_millis == radio_previous_time_sync_scheduled) {
// The GPS chip has not provided an updated time yet for some reason