summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch')
-rw-r--r--recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch b/recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch
new file mode 100644
index 0000000..695130b
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsd-3.20/0006-ubxtimelps.patch
@@ -0,0 +1,85 @@
+From 9c84fb9f0ceda3575f322a7da8021b1a30613906 Mon Sep 17 00:00:00 2001
+From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
+Date: Tue, 8 Dec 2020 16:23:30 +0200
+Subject: [PATCH] add missing leap seconds parts
+
+---
+ SConstruct | 1 +
+ driver_ubx.c | 21 ++++++++++++++++++++-
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index 33e0ff3..cd1a063 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -192,6 +192,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/driver_ubx.c b/driver_ubx.c
+index c2965ee..57cff58 100644
+--- a/driver_ubx.c
++++ b/driver_ubx.c
+@@ -886,6 +886,7 @@ static void ubx_msg_nav_timels(struct gps_device_t *session,
+ }
+ }
+
++
+ /**
+ * Geodetic position solution message
+ * UBX-NAV-POSLLH, Class 1, ID 2
+@@ -1932,7 +1933,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:
+- ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN], data_len);
++ GPSD_LOG(LOG_PROG, &session->context->errout, "UBX_NAV_TIMELS\n");
++#ifdef UBLOXTIMELS_ENABLE
++ ubx_msg_nav_timels(session, &buf[UBX_PREFIX_LEN],data_len);
++#endif // UBLOXTIMELS_ENABLE
+ break;
+ case UBX_NAV_TIMEUTC:
+ GPSD_LOG(LOG_DATA, &session->context->errout, "UBX-NAV-TIMEUTC\n");
+@@ -1977,6 +1981,7 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
+ GPSD_LOG(LOG_DATA, &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_rxm_sfrb(session, &buf[UBX_PREFIX_LEN], data_len);
+ break;
+ case UBX_RXM_SFRBX:
+@@ -2322,6 +2327,13 @@ static void ubx_cfg_prt(struct gps_device_t *session,
+ msg[2] = 0x00; /* rate */
+ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
+
++#ifdef UBLOXTIMELS_ENABLE
++ msg[0] = 0x01; /* class */
++ msg[1] = 0x26; /* msg id = UBX_NAV_TIMELS */
++ msg[2] = 0xff; /* rate */
++#endif /* UBLOXTIMELS_ENABLE */
++ (void)ubx_write(session, 0x06u, 0x01, msg, 3);
++
+ /* NAV-SVINFO became NAV-SAT */
+ msg[0] = 0x01; /* class */
+ msg[1] = 0x30; /* msg id = NAV-SVINFO */
+@@ -2431,6 +2443,13 @@ static void ubx_cfg_prt(struct gps_device_t *session,
+ msg[2] = 0x01; /* rate */
+ (void)ubx_write(session, 0x06u, 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 */
++
+ /* UBX-NAV-SVINFO deprecated in u-blox 8, gone in u-blox 9.
+ * Use UBX-NAV-SAT after u-blox 7 */
+ if (10 > session->driver.ubx.protver) {
+--
+2.7.4
+