diff options
Diffstat (limited to 'recipes-navigation/gpsd/gpsd-3.23/0006-ubxtimelps.patch')
-rw-r--r-- | recipes-navigation/gpsd/gpsd-3.23/0006-ubxtimelps.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/recipes-navigation/gpsd/gpsd-3.23/0006-ubxtimelps.patch b/recipes-navigation/gpsd/gpsd-3.23/0006-ubxtimelps.patch new file mode 100644 index 0000000..6f92aea --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.23/0006-ubxtimelps.patch @@ -0,0 +1,77 @@ +From 830a414311ee287340b11b60f5c6bb58aad7074f Mon Sep 17 00:00:00 2001 +From: Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> +Date: Tue, 28 Dec 2021 15:35:38 +0200 +Subject: [PATCH] Add missing leap seconds parts + +--- + SConscript | 1 + + drivers/driver_ubx.c | 19 +++++++++++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/SConscript b/SConscript +index 8c6136d..3ae2a7b 100644 +--- a/SConscript ++++ b/SConscript +@@ -315,6 +315,7 @@ boolopts = ( + ("tripmate", True, "DeLorme TripMate support"), + ("tsip", True, "Trimble TSIP support"), + ("ublox", True, "u-blox Protocol support"), ++ ("ubloxtimels", False, "u-blox UBX-NAV-TIMELS support (leap second)"), + # Non-GPS protocols + ("aivdm", True, "AIVDM support"), + ("gpsclock", True, "GPSClock support"), +diff --git a/drivers/driver_ubx.c b/drivers/driver_ubx.c +index bea2de0..e9f8a1c 100644 +--- a/drivers/driver_ubx.c ++++ b/drivers/driver_ubx.c +@@ -3798,7 +3798,10 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf, + mask = ubx_msg_nav_timegps(session, &buf[UBX_PREFIX_LEN], data_len); + break; + case UBX_NAV_TIMELS: ++ GPSD_LOG(LOG_PROG, &session->context->errout, "UBX_NAV_TIMELS\n"); ++#ifdef UBLOXTIMELS_ENABLE + mask = ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN], data_len); ++#endif // UBLOXTIMELS_ENABLE + break; + case UBX_NAV_TIMEQZSS: + GPSD_LOG(LOG_PROG, &session->context->errout, "UBX-NAV-TIMEQZSS\n"); +@@ -3853,6 +3856,7 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf, + GPSD_LOG(LOG_PROG, &session->context->errout, "UBX-RXM-RTCM\n"); + break; + case UBX_RXM_SFRB: ++ GPSD_LOG(LOG_DATA, &session->context->errout, "UBX_RXM_SFRB\n"); + mask = ubx_msg_rxm_sfrb(session, &buf[UBX_PREFIX_LEN], data_len); + break; + case UBX_RXM_SFRBX: +@@ -4267,6 +4271,14 @@ ubx_cfg_prt(struct gps_device_t *session, speed_t speed, const char parity, + (void)ubx_write(session, UBX_CLASS_CFG, 0x01, msg, 3); + } + ++#ifdef UBLOXTIMELS_ENABLE ++ msg[0] = 0x01; /* class */ ++ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */ ++ msg[2] = 0xff; /* rate */ ++ (void)ubx_write(session, 0x06u, 0x01, msg, 3); ++#endif /* UBLOXTIMELS_ENABLE */ ++ ++ + } else { /* MODE_BINARY */ + // nmea to turn off + const unsigned char nmea_off[] = { +@@ -4349,6 +4361,13 @@ ubx_cfg_prt(struct gps_device_t *session, speed_t speed, const char parity, + (void)ubx_write(session, UBX_CLASS_CFG, 0x01, msg, 3); + } + ++#ifdef UBLOXTIMELS_ENABLE ++ msg[0] = 0x01; /* class */ ++ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */ ++ msg[2] = 0xff; /* rate */ ++ (void)ubx_write(session, 0x06u, 0x01, msg, 3); ++#endif /* UBLOXTIMELS_ENABLE */ ++ + /* if protver unknown, turn on everything. Which may be too + * much for slower serial port speeds. Hope that we know protver + * later and can fix things then. */ +-- +2.25.1 + |