diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2006-09-25 19:06:09 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2006-09-25 19:06:09 +0000 |
commit | 568e4cea64b3d228d3125d8bcb5e7e14378a796a (patch) | |
tree | 7ff184918b9b0f77d1fc478ba554e80f432d8222 /sirfmon.c | |
parent | 790be7287c76fefb2e22d8152910954f36b3b976 (diff) | |
download | gpsd-568e4cea64b3d228d3125d8bcb5e7e14378a796a.tar.gz |
properly toggle the navigation paramters display
Diffstat (limited to 'sirfmon.c')
-rw-r--r-- | sirfmon.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -402,7 +402,6 @@ static void decode_sirf(unsigned char buf[], int len) display(mid19win,13, 42, "%d", getub(buf, 63));/* Response Time Max */ display(mid19win,14, 42, "%d", getub(buf, 64));/* Time/Accu & Duty Cycle Priority */ #undef YESNO - dispmode = !dispmode; break; case 0x1b: @@ -1159,6 +1158,7 @@ int main (int argc, char **argv) } else { (void)touchwin(mid19win); (void)wrefresh(mid19win); + (void)redrawwin(mid19win); } (void)wrefresh(debugwin); (void)wrefresh(cmdwin); @@ -1186,6 +1186,7 @@ int main (int argc, char **argv) } else { (void)touchwin(mid19win); (void)wrefresh(mid19win); + (void)redrawwin(mid19win); } (void)wrefresh(mid19win); (void)wrefresh(debugwin); @@ -1299,9 +1300,7 @@ int main (int argc, char **argv) goto quit; case 't': /* poll navigation params */ - putbyte(buf, 0,0x98); - putbyte(buf, 1,0x00); - (void)sendpkt(buf, 2, device); + dispmode = !dispmode; break; case 'q': @@ -1325,6 +1324,12 @@ int main (int argc, char **argv) } } + if (dispmode && (time(NULL) % 10 == 0)){ + putbyte(buf, 0,0x98); + putbyte(buf, 1,0x00); + (void)sendpkt(buf, 2, device); + } + if ((len = readpkt(buf)) != EOF) { decode_sirf(buf,len); } |