summaryrefslogtreecommitdiff
path: root/monitor_italk.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2009-03-04 18:49:43 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2009-03-04 18:49:43 +0000
commit5d1f82f279b56acc1632031399d833c9e1676745 (patch)
tree862b6af0ccbcbc6a320407af092740f785cb5723 /monitor_italk.c
parent466e153e221dc4cec7f33595a3b0d51b5d4f41ea (diff)
downloadgpsd-5d1f82f279b56acc1632031399d833c9e1676745.tar.gz
The itrax03 is a 12-channel receiver. so say all the spec sheets...
yet i'm getting at least 13 SV reports, and that's not counting WAAS birds. maybe they meant "12 GPS channel + a few more for WAAS"
Diffstat (limited to 'monitor_italk.c')
-rw-r--r--monitor_italk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/monitor_italk.c b/monitor_italk.c
index ad41d829..31923ea7 100644
--- a/monitor_italk.c
+++ b/monitor_italk.c
@@ -34,15 +34,15 @@ static bool italk_initialize(void)
int i;
/* "heavily inspired" by monitor_nmea.c */
- if ((satwin = derwin(devicewin, 15, 27, 0, 0)) == NULL)
+ if ((satwin = derwin(devicewin, MAX_NR_VISIBLE_PRNS+3, 27, 0, 0)) == NULL)
return false;
(void)wborder(satwin, 0, 0, 0, 0, 0, 0, 0, 0),
(void)syncok(satwin, true);
(void)wattrset(satwin, A_BOLD);
display(satwin, 1, 1, "Ch SV Az El S/N Flag U");
- for (i = 0; i < SIRF_CHANNELS; i++)
+ for (i = 0; i < MAX_NR_VISIBLE_PRNS; i++)
display(satwin, (int)(i+2), 1, "%2d",i);
- display(satwin, 14, 7, " PRN_STATUS ");
+ display(satwin, MAX_NR_VISIBLE_PRNS+2, 7, " PRN_STATUS ");
(void)wattrset(satwin, A_NORMAL);
/* "heavily inspired" by monitor_nmea.c */
@@ -188,8 +188,8 @@ static void display_itk_prnstatus(unsigned char *buf, size_t len)
return;
nchan = (unsigned int)getleuw(buf, 7 +50);
- if (nchan > MAXCHANNELS)
- nchan = MAXCHANNELS;
+ if (nchan > MAX_NR_VISIBLE_PRNS)
+ nchan = MAX_NR_VISIBLE_PRNS;
for (i = 0; i < nchan; i++) {
unsigned int off = 7+ 52 + 10 * i;
unsigned short fl;
@@ -205,7 +205,7 @@ 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++){
+ for ( ; i < MAX_NR_VISIBLE_PRNS; i++){
wmove(satwin, i+2, 4);
wprintw(satwin, " ");
}