diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-09-23 01:55:35 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-09-23 01:55:35 -0400 |
commit | 14d3dc8a7dce78c0fe7317325c2e862a52d6568d (patch) | |
tree | fb2d5e8e6d0df9772b4329b72882bcbb36b617d5 /packet.c | |
parent | 1cd59deecca353fadd4e1fc25a5054a0fd633ab6 (diff) | |
download | gpsd-14d3dc8a7dce78c0fe7317325c2e862a52d6568d.tar.gz |
Deal with the Accutime Gold's known issues. All regression tests pass.
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1741,14 +1741,19 @@ void packet_parse(struct gps_packet_t *lexer) else if ((0x8e == pkt_id) || (0x8f == pkt_id)) /* pass */ ; /* - * [TSIP] says the 0xbb payload should be 44 bytes, but - * 40 is the only length the TSIP driver knows how to use. - * We've had a report that the Accutime Gold ships a - * different length. + * This is according to [TSIP]. */ else if (TSIP_ID_AND_LENGTH(0xbb, 40)) /* pass */ ; + /* + * The Accutime Gold ships a version of this packet with a + * 43-byte payload. We only use the first 21 bytes, and + * parts after byte 27 are padding. + */ + else if (TSIP_ID_AND_LENGTH(0xbb, 43)) + /* pass */ ; else { + /* pass */ ; gpsd_report(LOG_IO, "TSIP REJECT pkt_id = %#02x, packetlen= %zu\n", pkt_id, packetlen); |