diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-05-18 15:02:12 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-05-18 15:02:12 -0400 |
commit | 5d538059dc05870f55ffbf2e34dbc490eeb95f4f (patch) | |
tree | a7c223f5f267e6d1aa47e426c23b26746e497f40 /driver_sirf.c | |
parent | 7a1bed4e703fb73b05b56e802992843f0e23f6ca (diff) | |
download | gpsd-5d538059dc05870f55ffbf2e34dbc490eeb95f4f.tar.gz |
Back out my attempt at ACK synchrinization, it fails on SiRF III.
Diffstat (limited to 'driver_sirf.c')
-rw-r--r-- | driver_sirf.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/driver_sirf.c b/driver_sirf.c index b28e4673..e81673d1 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -237,22 +237,6 @@ static bool sirf_write(struct gps_device_t *session, unsigned char *msg) size_t i, len; bool ok; - /* - * Control strings spaced too closely together confuse the SiRF - * IV. This wasn't an issue on older SiRFs, but they've gone to a - * lower-powered processor that apparently has trouble keeping up. - * Now you have to wait for the ACK, otherwise chaos ensues. - */ - if (time(NULL) - session->driver.sirf.last_send > SIRF_RETRY_TIME) - session->driver.sirf.need_ack = false; - /* can also be false because ACK was received after last send */ - if (session->driver.sirf.need_ack) { - gpsd_report(session->context->debug, LOG_WARN, - "SiRF: write of control type %02x failed, awaiting ACK.\n", - msg[4]); - return false; - } - len = (size_t) ((msg[2] << 8) | msg[3]); /* calculate CRC */ @@ -269,8 +253,6 @@ static bool sirf_write(struct gps_device_t *session, unsigned char *msg) "SiRF: Writing control type %02x:\n", msg[4]); ok = (gpsd_write(session, (const char *)msg, len+8) == (ssize_t) (len+8)); - session->driver.sirf.need_ack = true; - session->driver.sirf.last_send = time(NULL); return (ok); } @@ -1240,14 +1222,12 @@ gps_mask_t sirf_parse(struct gps_device_t * session, unsigned char *buf, case 0x0b: /* Command Acknowledgement MID 11 */ gpsd_report(session->context->debug, LOG_PROG, "SiRF: ACK 0x0b: %02x\n", getub(buf, 1)); - session->driver.sirf.need_ack = false; return 0; case 0x0c: /* Command NAcknowledgement MID 12 */ gpsd_report(session->context->debug, LOG_PROG, "SiRF: NAK 0x0c: %02x\n", getub(buf, 1)); /* ugh -- there's no alternative but silent failure here */ - session->driver.sirf.need_ack = false; return 0; case 0x0d: /* Visible List MID 13 */ @@ -1400,13 +1380,6 @@ static void sirfbin_event_hook(struct gps_device_t *session, event_t event) } if (event == event_configure) { - /* might not be time for the next init string yet */ - if (time(NULL) - session->driver.sirf.last_send > SIRF_RETRY_TIME) - session->driver.sirf.need_ack = false; - /* can also be false because ACK was received after last send */ - if (session->driver.sirf.need_ack) - return; - switch (session->driver.sirf.cfg_stage++) { case 0: /* this slot used by event_identified */ |