diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-01-20 03:45:21 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-01-20 03:45:21 -0500 |
commit | e82a3a8a34f66ebfe64faa5d2c1eab55e32a612b (patch) | |
tree | 5e6ea1a67188f5bf3d8584a1c21b765ee05963ae /monitor_sirf.c | |
parent | 7a6104a7f7ca339f7d57ca324afbc24177dbfd23 (diff) | |
download | gpsd-e82a3a8a34f66ebfe64faa5d2c1eab55e32a612b.tar.gz |
Unconditionall enable SiRF's PPS message, and watch for it.
All regression tests pass.
Diffstat (limited to 'monitor_sirf.c')
-rw-r--r-- | monitor_sirf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor_sirf.c b/monitor_sirf.c index 8c26f58f..de64c891 100644 --- a/monitor_sirf.c +++ b/monitor_sirf.c @@ -24,6 +24,7 @@ static WINDOW *mid2win, *mid4win, *mid6win, *mid7win, *mid9win, *mid13win; static WINDOW *mid19win, *mid27win; static bool dispmode = false, subframe_enabled = false; static int nfix, fix[20]; +static int leapseconds; /*@ -nullassign @*/ static char *verbpat[] = { @@ -108,7 +109,7 @@ static bool sirf_initialize(void) "Week+TOW: Day: Heading: speed m/s"); (void)wmove(mid2win, 4, 1); (void)wprintw(mid2win, - "Skew: TZ: HDOP: M1: M2: "); + "Leap: TZ: HDOP: M1: M2: "); (void)wmove(mid2win, 5, 1); (void)wprintw(mid2win, "Fix:"); display(mid2win, 6, 24, " Packet type 2 (0x02) "); @@ -226,8 +227,7 @@ static void decode_time(int week, int tow) /* skew from leap-seconds */ (void)wmove(mid2win, 4, 8); (void)wattrset(mid2win, A_UNDERLINE); - (void)wprintw(mid2win, "%f", - timestamp() - gpstime_to_unix(week, tow / 100.0)); + (void)wprintw(mid2win, "%d", leapseconds); /* offset from gmt in seconds */ (void)wmove(mid2win, 4, 29); (void)wprintw(mid2win, "%d", gmt_offset); @@ -554,6 +554,7 @@ static void sirf_update(void) monitor_log("SBP 0x32="); break; case 0x34: /* PPS Time */ + leapseconds = (int)getbeu16(buf, 8); monitor_log("PPS 0x34="); break; |