diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2007-12-28 03:13:44 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2007-12-28 03:13:44 +0000 |
commit | 35515b0d8d0b4594b90d7b6cc9cca218e89ee824 (patch) | |
tree | a367a14d3a083772b3f90000c29338b60af74366 /packet.c | |
parent | df59e120bc7ecc8e737857e0710d95fc6a68e4ce (diff) | |
download | gpsd-35515b0d8d0b4594b90d7b6cc9cca218e89ee824.tar.gz |
Backed out some recent changes that broke regression tests.
Specifically, the changes to sirf.c from ckuethe to stop
rAte-linmiting satellite messages (27 Dec 2007) and the changes to
packet.c and packet.states.h from ckuethe on 25 Dec 2007 to make the
packet sniffer 'a bit more picky'.
The packet-getter changes need to be re-implemented in a way
that doesn't break the RTCM regression test.
The SiRF changes will break the regression tests, and that's OK, but
they need to be committed along with a rebuild of the tests so
the tests pass after commit.
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 70 |
1 files changed, 4 insertions, 66 deletions
@@ -96,7 +96,7 @@ static void nextstate(struct gps_packet_t *lexer, #endif /* NMEA_ENABLE */ #if defined(TNT_ENABLE) || defined(GARMINTXT_ENABLE) if (c == '@') { - lexer->state = AT_LEADER; + lexer->state = TNT_LEADER; break; } #endif @@ -221,72 +221,10 @@ static void nextstate(struct gps_packet_t *lexer, lexer->state = GROUND_STATE; break; #if defined(TNT_ENABLE) || defined(GARMINTXT_ENABLE) - case AT_LEADER: -#ifdef GARMINTXT_ENABLE - if (isdigit(c)) - lexer->state = GARMINTXT_NUM1; -#ifdef TNT_ENABLE - else -#endif /* TNT_ENABLE */ -#endif /* GARMINTXT_ENABLE */ -#ifdef TNT_ENABLE - if ((c == 'B') || (c == 'C') || (c == 'F') || - (c == 'I') || (c == 'W') || (c == 'X')) - lexer->state = TNT_CMDCHAR; - else - lexer->state = GROUND_STATE; -#endif /* TNT_ENABLE */ - break; -#ifdef GARMINTXT_ENABLE - case GARMINTXT_NUM1: - if (isdigit(c)) - lexer->state = GARMINTXT_NUM2; - else - lexer->state = GROUND_STATE; - break; - case GARMINTXT_NUM2: - if (isdigit(c)) - lexer->state = GARMINTXT_NUM3; - else - lexer->state = GROUND_STATE; - break; - case GARMINTXT_NUM3: - if (isdigit(c)) - lexer->state = GARMINTXT_NUM4; - else - lexer->state = GROUND_STATE; - break; - case GARMINTXT_NUM4: - if (isdigit(c)) - lexer->state = GARMINTXT_NUM5; - else - lexer->state = GROUND_STATE; + case TNT_LEADER: + lexer->state = NMEA_LEADER_END; break; - case GARMINTXT_NUM5: - if (isdigit(c)) - lexer->state = GARMINTXT_NUM6; - else - lexer->state = GROUND_STATE; - break; - case GARMINTXT_NUM6: - if (isdigit(c)) - lexer->state = GARMINTXT_RECOGNIZED; - else - lexer->state = GROUND_STATE; - break; -#endif /* GARMINTXT_ENABLE */ -#ifdef TNT_ENABLE - case TNT_CMDCHAR: - lexer->state = NMEA_LEADER_END; - break; -#endif /* TNT_ENABLE */ -#endif /* TNT_ENABLE || GARMINTXT_ENABLE */ -#ifdef GARMINTXT_ENABLE - case GARMINTXT_RECOGNIZED: /* FALLTHROUGH */ -#endif /* GARMINTXT_ENABLE */ -#ifdef TNT_ENABLE - case TNT_RECOGNIZED: /* FALLTHROUGH */ -#endif /* TNT_ENABLE */ +#endif case NMEA_LEADER_END: if (c == '\r') lexer->state = NMEA_CR; |