summaryrefslogtreecommitdiff
path: root/monitor_oncore.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2009-12-07 23:23:09 +0000
committerGary E. Miller <gem@rellim.com>2009-12-07 23:23:09 +0000
commit0c79dc5e9fe7e60ccb09a58764b1bfcab9b926f4 (patch)
tree64706f7a3d7cddf1138b90d7a459e1c10a2c41b6 /monitor_oncore.c
parent2342d70b1d72e98e58e84f697fffaa0c2b9aadc4 (diff)
downloadgpsd-0c79dc5e9fe7e60ccb09a58764b1bfcab9b926f4.tar.gz
Tweaks to improve Oncore GPS PPS performance.
>From Hakan Johansson.
Diffstat (limited to 'monitor_oncore.c')
-rw-r--r--monitor_oncore.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/monitor_oncore.c b/monitor_oncore.c
index 7000864c..776291ee 100644
--- a/monitor_oncore.c
+++ b/monitor_oncore.c
@@ -29,7 +29,7 @@
#if defined(ONCORE_ENABLE) && defined(BINARY_ENABLE)
extern const struct gps_type_t oncore_binary;
-static WINDOW *Ea1win, *Eawin, *Bbwin, *Enwin, *Bowin, *Aswin, *Atwin;
+static WINDOW *Ea1win, *Eawin, *Bbwin, *Enwin, *Bowin, *Aywin, *Aswin, *Atwin;
static unsigned char EaSVlines[8];
static const char *antenna[] =
@@ -103,6 +103,7 @@ static bool oncore_initialize(void)
Bbwin = subwin(devicewin, MAXVISSATS+3, 22, 6, 28);
Enwin = subwin(devicewin, 10, 29, 6, 51);
Bowin = subwin(devicewin, 4, 11, 17, 0);
+ Aywin = subwin(devicewin, 4, 15, 17, 12);
Atwin = subwin(devicewin, 5, 9, 16, 51);
Aswin = subwin(devicewin, 5, 19, 16, 61);
/*@ +onlytrans @*/
@@ -116,6 +117,7 @@ static bool oncore_initialize(void)
(void)syncok(Bbwin, true);
(void)syncok(Enwin, true);
(void)syncok(Bowin, true);
+ (void)syncok(Aywin, true);
(void)syncok(Aswin, true);
(void)syncok(Atwin, true);
@@ -158,9 +160,15 @@ static bool oncore_initialize(void)
(void)wborder(Bowin, 0, 0, 0, 0, 0, 0, 0, 0),
(void)wattrset(Bowin, A_BOLD);
(void)mvwprintw(Bowin, 1, 1, "UTC:");
- (void)mvwprintw(Bowin, 3, 1, " @@Bo ");
+ (void)mvwprintw(Bowin, 3, 2, " @@Bo ");
(void)wattrset(Bowin, A_NORMAL);
+ (void)wborder(Aywin, 0, 0, 0, 0, 0, 0, 0, 0),
+ (void)wattrset(Aywin, A_BOLD);
+ (void)mvwprintw(Aywin, 1, 1, "PPS delay:");
+ (void)mvwprintw(Aywin, 3, 4, " @@Ay ");
+ (void)wattrset(Aywin, A_NORMAL);
+
(void)wborder(Atwin, 0, 0, 0, 0, 0, 0, 0, 0),
(void)wattrset(Atwin, A_BOLD);
(void)mvwprintw(Atwin, 1, 1, "PHold:");
@@ -393,7 +401,7 @@ static void oncore_update(void)
utc_offset = (unsigned char)getub(buf, 4);
if (utc_offset != (unsigned char) 0)
- (void)mvwprintw(Bowin, 2, 2, "GPS%+3d",utc_offset);
+ (void)mvwprintw(Bowin, 2, 2, "GPS%+4d",utc_offset);
else
(void)mvwprintw(Bowin, 2, 2, "unknown",utc_offset);
}
@@ -401,6 +409,18 @@ static void oncore_update(void)
monitor_log("Bo =");
break;
+ case ONCTYPE('A','y'):
+ {
+ double pps_delay;
+
+ pps_delay = getbesl(buf, 4) / 1000000.0;
+
+ (void)mvwprintw(Aywin, 2, 2, " %7.3f ms",pps_delay);
+ }
+
+ monitor_log("Ay =");
+ break;
+
case ONCTYPE('A','t'):
{
unsigned char mode;
@@ -449,6 +469,7 @@ static void oncore_wrap(void)
(void)delwin(Bbwin);
(void)delwin(Enwin);
(void)delwin(Bowin);
+ (void)delwin(Aywin);
(void)delwin(Atwin);
(void)delwin(Aswin);
}