summaryrefslogtreecommitdiff
path: root/libgps_sock.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-09-14 06:54:44 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-09-14 06:57:44 -0400
commit531f5384638b9fe3e21e542ce6eed9a39b98fdfb (patch)
tree8bb2f3db54e8243f874d61c7ea58f7a5a0e70041 /libgps_sock.c
parentea0b84da541fb6e69d03a9dc85c399c7e4fff4cd (diff)
downloadgpsd-531f5384638b9fe3e21e542ce6eed9a39b98fdfb.tar.gz
Split Type 24 reporting, including the -s option to gpsdecode.
All regression tests pass.
Diffstat (limited to 'libgps_sock.c')
-rw-r--r--libgps_sock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgps_sock.c b/libgps_sock.c
index b8d01034..bdbecdea 100644
--- a/libgps_sock.c
+++ b/libgps_sock.c
@@ -517,6 +517,8 @@ int gps_sock_stream(struct gps_data_t *gpsdata, unsigned int flags,
(void)strlcat(buf, "\"scaled\":false,", sizeof(buf));
if (flags & WATCH_TIMING)
(void)strlcat(buf, "\"timing\":false,", sizeof(buf));
+ if (flags & WATCH_SPLIT24)
+ (void)strlcat(buf, "\"split24\":false,", sizeof(buf));
if (buf[strlen(buf) - 1] == ',')
buf[strlen(buf) - 1] = '\0';
(void)strlcat(buf, "};", sizeof(buf));
@@ -543,6 +545,8 @@ int gps_sock_stream(struct gps_data_t *gpsdata, unsigned int flags,
(void)strlcat(buf, "\"scaled\":true,", sizeof(buf));
if (flags & WATCH_TIMING)
(void)strlcat(buf, "\"timing\":true,", sizeof(buf));
+ if (flags & WATCH_SPLIT24)
+ (void)strlcat(buf, "\"split24\":true,", sizeof(buf));
/*@-nullpass@*//* shouldn't be needed, splint has a bug */
if (flags & WATCH_DEVICE)
(void)snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),