summaryrefslogtreecommitdiff
path: root/driver_nmea0183.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-08 11:21:38 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-08 11:21:38 -0500
commit5c8d781fa0bc781e6c55725bd291bd2037d6812f (patch)
tree1a52da79ecbb4b56eda9b010dd9142ad32fc7f31 /driver_nmea0183.c
parent165a7e9743429122045e7a4dc7a8114efce85fef (diff)
downloadgpsd-5c8d781fa0bc781e6c55725bd291bd2037d6812f.tar.gz
Partial code for setting MTK pulse width to a good value.
More is needed near driver_nmea0183.c:1108.
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r--driver_nmea0183.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index 484dda99..f277d726 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -1098,7 +1098,15 @@ static gps_mask_t processMTK3301(int c UNUSED, char *field[],
msg = atoi(&(session->driver.nmea.field[0])[4]);
switch (msg) {
- case 705: /* */
+ case 424: /* PPS pulse width response */
+ /*
+ * Response will look something like: $PMTK424,0,0,1,0,69*12
+ * The pulse width is in field 5 (69 in this example).
+ * The response, if required, should look something like this:
+ * nmea_send(session, "$PMTK324,0,0,1,0,127875")
+ */
+ return ONLINE_SET;
+ case 705: /* return device subtype */
(void)strlcat(session->subtype, field[1], sizeof(session->subtype));
(void)strlcat(session->subtype, "-", sizeof(session->subtype));
(void)strlcat(session->subtype, field[2], sizeof(session->subtype));