diff options
author | Gary E. Miller <gem@rellim.com> | 2011-01-04 16:54:30 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2011-01-04 16:54:30 -0800 |
commit | c950fd55445eab6dc58b83e6f3573b2b17461ffb (patch) | |
tree | 1c4b7a0cf39414ee323c3f9297f03db06dd7a378 /gpspipe.c | |
parent | e921da752a4b24d2b1acb41867297029916be079 (diff) | |
download | gpsd-c950fd55445eab6dc58b83e6f3573b2b17461ffb.tar.gz |
More changes to gpspipe for subframes, no joy, yet.
Diffstat (limited to 'gpspipe.c')
-rw-r--r-- | gpspipe.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -102,10 +102,11 @@ static void usage(void) "-t Time stamp the data.\n" "-T [format] set the timestamp format (strftime(3)-like; implies '-t')\n" "-s [serial dev] emulate a 4800bps NMEA GPS on serial port (use with '-r').\n" + "-S Dump gpsd subframe data.\n" "-n [count] exit after count packets.\n" "-v Print a little spinner.\n" "-V Print version and exit.\n\n" - "You must specify one, or both, of -r/-w.\n" + "You must specify one, or more, of -r/-w/-S.\n" "You must use -o if you use -d.\n"); } @@ -122,6 +123,7 @@ int main(int argc, char **argv) bool new_line = true; bool raw = false; bool watch = false; + bool subframe = false; long count = -1; int option; unsigned int vflag = 0, l = 0; @@ -159,6 +161,7 @@ int main(int argc, char **argv) binary = true; break; case 'S': + subframe = true; flags |= WATCH_SUBFRAMES; break; case 'd': @@ -216,9 +219,9 @@ int main(int argc, char **argv) exit(1); } - if (!raw && !watch && !binary) { + if (!raw && !watch && !binary && !subframe) { (void)fprintf(stderr, - "gpspipe: one of '-R', '-r' or '-w' is required.\n"); + "gpspipe: one of '-R', '-r', '-S', or '-w' is required.\n"); exit(1); } |