From 0efea9b5b4e0ef0de100532630e8d10f2ef5eaaf Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Mon, 5 Nov 2018 17:01:47 -0800 Subject: driver_ubx: Save leap seconds from RAWX. If valid. --- driver_ubx.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'driver_ubx.c') diff --git a/driver_ubx.c b/driver_ubx.c index 1fb4435e..4441b956 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -832,6 +832,11 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session, "UBX_RXM_RAWX: rcvTow %f week %u leapS %d numMeas %u recStat %d\n", rcvTow, week, leapS, numMeas, recStat); + if (recStat & 1) { + /* Valid leap seconds */ + session->context->leap_seconds = -leapS; + session->context->valid |= LEAP_SECOND_VALID; + } /* covert GPS weeks and TOW to UTC */ session->newdata.time = gpsd_gpstime_resolve(session, week, rcvTow); session->gpsdata.raw.mtime.tv_nsec = -- cgit v1.2.1