diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-08-24 10:45:17 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-24 10:49:32 -0400 |
commit | 628782fc1508b7e4ffd4649990fa3a14ae707c54 (patch) | |
tree | 8cee0412955e7a94987d0de40c08d9d83c8e3683 /driver_sirf.c | |
parent | 1433efcba69fef54ed6d75b480ae222332ccb989 (diff) | |
download | gpsd-628782fc1508b7e4ffd4649990fa3a14ae707c54.tar.gz |
Eliminate the tag field entirely, even internally.
All regression tests pass.
Diffstat (limited to 'driver_sirf.c')
-rw-r--r-- | driver_sirf.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/driver_sirf.c b/driver_sirf.c index 619b3284..377e1c8f 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -639,23 +639,23 @@ static double sirf_time_offset(struct gps_device_t *session) } /* the PPS time message */ - else if (strcmp(session->tag, "MID52") == 0) { + else if (session->driver.sirf.lastid == (char)52) { retval = 0.3; } /* u-blox EMND message */ - else if (strcmp(session->tag, "MID98") == 0) { + else if (session->driver.sirf.lastid == (char)98) { retval = 0.570; } #ifdef __UNUSED__ /* geodetic-data message */ - else if (strcmp(session->tag, "MID41") == 0) { + else if (session->driver.sirf.lastid == (char)41) { retval = 0.570; } #endif /* __UNUSED__ */ /* the Navigation Solution message */ - else if (strcmp(session->tag, "MID2") == 0) { + else if (session->driver.sirf.lastid == (char)2) { if (session->sourcetype == source_usb) { retval = 0.640; /* USB, expect +/- 50mS jitter */ } else { @@ -1171,8 +1171,7 @@ gps_mask_t sirf_parse(struct gps_device_t * session, unsigned char *buf, len -= 8; gpsd_report(session->context->debug, LOG_RAW, "SiRF: Raw packet type 0x%02x\n", buf[0]); - (void)snprintf(session->tag, sizeof(session->tag), - "MID%d", (int)buf[0]); + session->driver.sirf.lastid = buf[0]; /* could change if the set of messages we enable does */ session->cycle_end_reliable = true; |