Skip to content

Commit fe6d6f6

Browse files
AP_GPS: fix 32 bit micros overflow issue in pps handling
1 parent 6e2ac30 commit fe6d6f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libraries/AP_GPS/AP_GPS_UBLOX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1903,7 +1903,7 @@ AP_GPS_UBLOX::pps_interrupt(uint8_t pin, bool high, uint32_t timestamp_us)
19031903
#if !HAL_HSI_TRIM_USING_PPS
19041904
_last_pps_time_us = AP_HAL::micros64();
19051905
#else
1906-
const uint32_t cur_pps_time_us = AP_HAL::micros();
1906+
const uint64_t cur_pps_time_us = AP_HAL::micros64();
19071907
const uint32_t delta_time_us = cur_pps_time_us - _last_pps_time_us;
19081908
_last_pps_time_us = cur_pps_time_us;
19091909
_last_delta_time_us = delta_time_us;

0 commit comments

Comments
 (0)