summaryrefslogtreecommitdiff
path: root/gpspipe.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-13 23:09:51 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-13 23:09:51 -0500
commit6fcbfd7aec4e157935b5c91d72fb1c74c4f70252 (patch)
tree7412c199347164c7397679741f6822979ed41e45 /gpspipe.c
parentc9e8940e44b59f961d764d31950fc577e2c45972 (diff)
downloadgpsd-6fcbfd7aec4e157935b5c91d72fb1c74c4f70252.tar.gz
Add -P option to gpspipe for including PPS drift JSON in NMEA or raw dumps.
Diffstat (limited to 'gpspipe.c')
-rw-r--r--gpspipe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gpspipe.c b/gpspipe.c
index 5217d2ca..2c4b8e98 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -109,6 +109,7 @@ static void usage(void)
"-n [count] exit after count packets.\n"
"-v Print a little spinner.\n"
"-p Include profiling info in the JSON.\n"
+ "-P Include PPS JSON in NMEA or raw mode.\n"
"-V Print version and exit.\n\n"
"You must specify one, or more, of -r, -R, or -w\n"
"You must use -o if you use -d.\n");
@@ -142,7 +143,7 @@ int main(int argc, char **argv)
/*@-branchstate@*/
flags = WATCH_ENABLE;
- while ((option = getopt(argc, argv, "?dD:lhrRwStT:vVn:s:o:pu2")) != -1) {
+ while ((option = getopt(argc, argv, "?dD:lhrRwStT:vVn:s:o:pPu2")) != -1) {
switch (option) {
case 'D':
debug = atoi(optarg);
@@ -195,6 +196,9 @@ int main(int argc, char **argv)
case 'p':
profile = true;
break;
+ case 'P':
+ flags |= WATCH_PPS;
+ break;
case 'V':
(void)fprintf(stderr, "%s: %s (revision %s)\n",
argv[0], VERSION, REVISION);