diff options
author | Keith Packard <keithp@keithp.com> | 2013-03-30 01:33:49 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-03-30 01:33:49 -0700 |
commit | 649999863c7228ead0225968752d068dc0d30091 (patch) | |
tree | 6f3ac2cdab37a2b6975b0ead08f7d92bd6f587cb /ao-tools | |
parent | b3d8956df3a3ecb3918b5db4d78b057d68541c33 (diff) |
altos: Add logging and telem to telegps
This turns on telemetry, APRS, RDF and data logging for telegps.
Data is logged as soon as GPS has a date to create the right
filename, using files of the form YYYYMMDD.LOG which just barely fits
in a FAT filename.
Telemetry/RDF/APRS are all separately controllable.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools')
-rw-r--r-- | ao-tools/ao-telem/ao-telem.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ao-tools/ao-telem/ao-telem.c b/ao-tools/ao-telem/ao-telem.c index e7fc8e26..d2dae5a7 100644 --- a/ao-tools/ao-telem/ao-telem.c +++ b/ao-tools/ao-telem/ao-telem.c @@ -24,6 +24,7 @@ #include "cc.h" static const struct option options[] = { + { .name = "crc", .has_arg = 0, .val = 'c' }, { 0, 0, 0, 0}, }; @@ -44,8 +45,12 @@ main (int argc, char **argv) char *s; FILE *file; int serial; - while ((c = getopt_long(argc, argv, "", options, NULL)) != -1) { + int ignore_crc = 0; + while ((c = getopt_long(argc, argv, "c", options, NULL)) != -1) { switch (c) { + case 'c': + ignore_crc = 1; + break; default: usage(argv[0]); break; @@ -74,7 +79,7 @@ main (int argc, char **argv) printf ("serial %5d rssi %d status %02x tick %5d type %3d ", telem.generic.serial, rssi, telem.generic.status, telem.generic.tick, telem.generic.type); - if ((telem.generic.status & (1 << 7)) == 0) { + if (!ignore_crc && (telem.generic.status & (1 << 7)) == 0) { printf ("CRC error\n"); continue; } |