diff options
author | Gary E. Miller <gem@rellim.com> | 2010-04-16 19:12:19 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2010-04-16 19:12:19 -0700 |
commit | 15780e298e21349bb1f4e1a7874a46bdb1289494 (patch) | |
tree | be55c4a28247a1f56024b4ea3bd1a7ce38d326a5 /driver_italk.c | |
parent | dfaf4f4cf37b4eb1f5705627e21960c4282c7ab5 (diff) | |
download | gpsd-15780e298e21349bb1f4e1a7874a46bdb1289494.tar.gz |
Tests by Chris Keuthe show that itrax has the same 50BPS issues as
SiRF had. ubx probably the same. So pulled the 50BPS parity checking
into a common subroutine for common use.
Diffstat (limited to 'driver_italk.c')
-rw-r--r-- | driver_italk.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/driver_italk.c b/driver_italk.c index 44aa6a18..5274a779 100644 --- a/driver_italk.c +++ b/driver_italk.c @@ -216,7 +216,7 @@ static gps_mask_t decode_itk_subframe(struct gps_device_t *session, unsigned char *buf, size_t len) { unsigned short flags, prn, sf; - unsigned int words[10]; + unsigned int i, words[10]; if (len != 64) { gpsd_report(LOG_PROG, @@ -239,6 +239,7 @@ static gps_mask_t decode_itk_subframe(struct gps_device_t *session, * words with parity checking done but parity bits still present." */ /*@-type@*/ +#ifdef __UNUSED__ words[0] = (getbeul(buf, 7 + 14) & 0x3fffffff) >> 6; words[1] = (getleul(buf, 7 + 18) & 0x3fffffff) >> 6; words[2] = (getleul(buf, 7 + 22) & 0x3fffffff) >> 6; @@ -249,9 +250,13 @@ static gps_mask_t decode_itk_subframe(struct gps_device_t *session, words[7] = (getleul(buf, 7 + 42) & 0x3fffffff) >> 6; words[8] = (getleul(buf, 7 + 46) & 0x3fffffff) >> 6; words[9] = (getleul(buf, 7 + 50) & 0x3fffffff) >> 6; +#endif /*@+type@*/ + for (i = 0; i < 10; i++) { + words[i] = (unsigned int)getbeul(buf, 4 * i + 17); + } - gpsd_interpret_subframe(session, words); + gpsd_interpret_subframe_raw(session, words); return ONLINE_IS; } |