Skip to content

Commit

Permalink
AP_GPS: use 64 bit time in the pps interrupt callback
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed Jun 25, 2024
1 parent 0455a02 commit caa0cf6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_GPS/AP_GPS_UBLOX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ AP_GPS_UBLOX::_parse_gps(void)
(unsigned)_buffer.nav_tp5.flags,
(unsigned)_buffer.nav_tp5.freqPeriod);
#ifdef HAL_GPIO_PPS
hal.gpio->attach_interrupt(HAL_GPIO_PPS, FUNCTOR_BIND_MEMBER(&AP_GPS_UBLOX::pps_interrupt, void, uint8_t, bool, uint32_t), AP_HAL::GPIO::INTERRUPT_FALLING);
hal.gpio->attach_interrupt(HAL_GPIO_PPS, FUNCTOR_BIND_MEMBER(&AP_GPS_UBLOX::pps_interrupt, void, uint8_t, bool, uint64_t), AP_HAL::GPIO::INTERRUPT_FALLING);
#endif
const uint16_t desired_flags = 0x003f;
const uint16_t desired_period_hz = _pps_freq;
Expand Down Expand Up @@ -1858,7 +1858,7 @@ AP_GPS_UBLOX::_parse_gps(void)
*/
#ifdef HAL_GPIO_PPS
void
AP_GPS_UBLOX::pps_interrupt(uint8_t pin, bool high, uint32_t timestamp_us)
AP_GPS_UBLOX::pps_interrupt(uint8_t pin, bool high, uint64_t timestamp_us)
{
_last_pps_time_us = timestamp_us;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_GPS/AP_GPS_UBLOX.h
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ class AP_GPS_UBLOX : public AP_GPS_Backend

uint8_t _pps_freq = 1;
#ifdef HAL_GPIO_PPS
void pps_interrupt(uint8_t pin, bool high, uint32_t timestamp_us);
void pps_interrupt(uint8_t pin, bool high, uint64_t timestamp_us);
void set_pps_desired_freq(uint8_t freq) override;
#endif

Expand Down

0 comments on commit caa0cf6

Please sign in to comment.