gpsd: Add patch to enable + configure PPS in TSIP (trimble) driver

In the sysmoBTS 2050, we want to configure the 1PPS output of the
trimble to be active only if it has at least 1 satellite in view,
and want to make the receiver output its time information in UTC,
rather than GPS time.
This commit is contained in:
Harald Welte 2013-10-09 23:43:43 +02:00
parent 5075145814
commit 8bb59f081a
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,27 @@
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;
}
}

View File

@ -8,12 +8,13 @@ PROVIDES = "virtual/gpsd"
EXTRANATIVEPATH += "chrpath-native"
PR = "r3.8"
PR = "r3.9"
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
file://0004-SConstruct-remove-rpath.patch \
file://0001-SConstruct-disable-html-and-man-docs-building-becaus.patch \
file://gpsd-tsip-pps.patch \
file://gpsd-default \
file://gpsd \
file://60-gpsd.rules \