generic-poky/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd-3.9/gpsd-tsip-pps.patch

28 lines
879 B
Diff

diff --git a/driver_tsip.c b/driver_tsip.c
index 3c99138..76cbc82 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -1016,6 +1016,22 @@ static void tsip_event_hook(struct gps_device_t *session, event_t event)
/* Request Navigation Configuration */
putbyte(buf, 0, 0x03);
(void)tsip_write(session, 0xbb, buf, 1);
+ gpsd_report(LOG_PROG, "Configuring + Enabling 1PPS\n");
+ /* enable 1pps */
+ putbyte(buf, 0, 0x4a);
+ putbyte(buf, 1, 0x01);
+ (void)tsip_write(session, 0x8e, buf, 2);
+
+ /* request PPS only if at least one sat is visible */
+ putbyte(buf, 0, 0x4e);
+ putbyte(buf, 1, 0x03);
+ (void)tsip_write(session, 0x8e, buf, 2);
+
+ /* request PPS and TSIP to use UTC time, not GPS */
+ putbyte(buf, 0, 0xa2);
+ putbyte(buf, 1, 0x03);
+ (void)tsip_write(session, 0x8e, buf, 2);
+
break;
}
}