diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2009-03-04 18:04:43 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2009-03-04 18:04:43 +0000 |
commit | d9797081b48084c906076ef879de8d0acfde63c0 (patch) | |
tree | ed6dac857ad2dbfb58b62b5153b3f1cdcff6cc29 /monitor_italk.c | |
parent | af0806a57ae3e5a4c95f8429e0acc2c02664f519 (diff) | |
download | gpsd-d9797081b48084c906076ef879de8d0acfde63c0.tar.gz |
fix decoding of used satellites.
wipe unused/invisible satellites from the PRN_STATUS pane
Diffstat (limited to 'monitor_italk.c')
-rw-r--r-- | monitor_italk.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/monitor_italk.c b/monitor_italk.c index 6c7cbaa7..ad41d829 100644 --- a/monitor_italk.c +++ b/monitor_italk.c @@ -77,8 +77,8 @@ static bool italk_initialize(void) static void display_itk_navfix(unsigned char *buf, size_t len){ - unsigned int tow, tod, nsec, d; - unsigned short gps_week, flags, cflags, pflags, nsv, svlist; + unsigned int tow, tod, nsec, d, svlist; + unsigned short gps_week, flags, cflags, pflags, nsv; unsigned short year, mon, day, hour, min, sec; double epx, epy, epz, evx, evy, evz; double latitude, longitude; @@ -141,7 +141,8 @@ static void display_itk_navfix(unsigned char *buf, size_t len){ (void)mvwaddch(navfixwin, 5, 27, ACS_DEGREE); (void)wmove(navfixwin, 7,11); - (void)wprintw(navfixwin, "%04u-%02u-%02u %02u:%02u:%02u", year, mon, day, hour, min, sec); + (void)wprintw(navfixwin, "%04u-%02u-%02u %02u:%02u:%02u", + year, mon, day, hour, min, sec); (void)wmove(navfixwin, 8,11); (void)wprintw(navfixwin, "%04u+%010.3lf", gps_week, tow/1000.0); (void)wmove(navfixwin, 8,33); @@ -165,16 +166,16 @@ static void display_itk_navfix(unsigned char *buf, size_t len){ (void)wmove(navfixwin, 11,6); { - char prn[4], satlist[40]; + char prn[4], satlist[38]; unsigned int i; satlist[0] = '\0'; for(i = 0; i<32; i++){ if (svlist & (1<<i)){ snprintf(prn, 4, "%u ", i+1); - strlcat(satlist, prn, 40); + strlcat(satlist, prn, 38); } } - (void)wprintw(navfixwin, "%-40s", satlist); + (void)wprintw(navfixwin, "%02d = %-38s", nsv, satlist); } wnoutrefresh(navfixwin); @@ -204,6 +205,10 @@ static void display_itk_prnstatus(unsigned char *buf, size_t len) prn, az, el, ss, fl, (fl & PRN_FLAG_USE_IN_NAV)? 'Y' : ' '); } + for ( ; i < nchan; i++){ + wmove(satwin, i+2, 4); + wprintw(satwin, " "); + } wnoutrefresh(satwin); return; } |