diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-03-31 10:44:11 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-03-31 10:44:11 +0000 |
commit | 9f3ad7e6cf42ab295a9d41f3c91c53ee736b30ce (patch) | |
tree | f38404f02273bbc9232e52b2e63fc9d2640d902d /sirfmon.c | |
parent | dd92fc3776a59ad431aa46e8711f4dd592fddf2d (diff) | |
download | gpsd-9f3ad7e6cf42ab295a9d41f3c91c53ee736b30ce.tar.gz |
Add experimental 'a' command to toggle reporting of 50BPS data.
Diffstat (limited to 'sirfmon.c')
-rw-r--r-- | sirfmon.c | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -47,6 +47,7 @@ static int nfix,fix[20]; static FILE *logfile; static int gmt_offset; static int dispmode = 0; +static int subframe_enabled = 0; static char *verbpat[] = { @@ -480,6 +481,13 @@ int main (int argc, char **argv) switch (line[0]) { + case 'a': /* toggle 50bps subframe data */ + memset(buf, '\0', sizeof(buf)); + putb(0, 0x80); + putb(24, subframe_enabled ? 0x00 : 0x04); + sendpkt(buf,25); + break; + case 'b': v = atoi(line+1); for (ip=rates; ip < rates+sizeof(rates)/sizeof(rates[0]); ip++) @@ -535,16 +543,9 @@ int main (int argc, char **argv) case 'l': /* open logfile */ if (logfile != NULL) fclose(logfile); - logfile = fopen(p,"a"); break; - case 'p': /* poll for almanac data */ - putb(0,0x92); - putb(1,0x00); - sendpkt(buf,2); - break; - case 't': /* poll navigation params */ putb(0,0x98); putb(1,0x00); @@ -692,11 +693,8 @@ static void decode_sirf(unsigned char buf[], int len) case 0x08: /* 50 BPS data */ ch = getb(1); mvwprintw(mid4win, ch, 27, "Y"); - wprintw(debugwin, "ALM %d (%d):",getb(2),ch); - for (off = 3; off < len; off += 4) - wprintw(debugwin, " %d",getl(off)); - wprintw(debugwin, "\n"); wprintw(debugwin, "50B 0x08="); + subframe_enabled = 1; break; case 0x09: /* Throughput */ |