diff options
author | Gary E. Miller <gem@rellim.com> | 2016-03-29 16:26:34 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-03-29 16:29:13 -0700 |
commit | e19519fa0aa4e5edff8ad008043aee6f14fa317f (patch) | |
tree | baf650ead5cf398b70a1be94f28d95918042180a /packet_states.h | |
parent | ab6cc0be8748d025ed571fc70e9f9bf30aecd443 (diff) | |
download | gpsd-e19519fa0aa4e5edff8ad008043aee6f14fa317f.tar.gz |
Parse Skytraq packets to inbuffer.
No packet decoder yet.
Diffstat (limited to 'packet_states.h')
-rw-r--r-- | packet_states.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packet_states.h b/packet_states.h index 2254f412..2f54d5a8 100644 --- a/packet_states.h +++ b/packet_states.h @@ -57,8 +57,10 @@ EARTHA_5, /* EARTHA leader H */ #endif /* EARTHMATE_ENABLE */ +#if defined(SIRF_ENABLE) || defined(SKYTRAQ_ENABLE) + SIRF_LEADER_1, /* seen first character of SiRF/Skytraq leader <0x0A> */ +#endif /* SIRF_ENABLE || SKYTRAQ_ENABLE */ #ifdef SIRF_ENABLE - SIRF_LEADER_1, /* we've seen first character of SiRF leader */ SIRF_LEADER_2, /* seen second character of SiRF leader */ SIRF_LENGTH_1, /* seen first byte of SiRF length */ SIRF_PAYLOAD, /* we're in a SiRF payload part */ @@ -69,15 +71,15 @@ #ifdef SKYTRAQ_ENABLE /* <0xA0,0xA1><Len><Message ID><Message Body><csum><0x0D,0x0A> */ - /* Len is of Message ID and Message Body */ - SKY_EXPECTED, /* expecting Skytraq packet */ - SKY_LEADER_1, /* saw leading 0xA0 */ - SKY_LEADER_2, /* saw leading 0xA1 */ + /* Len is two bytes, is the length of Message ID and Message Body */ + /* Skytraq leader 1 same as SIRF_LEADER_1 */ + SKY_LEADER_2, /* saw leader 2 <0xA1> */ SKY_LENGTH_1, /* saw first byte of packet length */ SKY_LENGTH_2, /* saw second byte of packet length */ - SKY_MID, /* saw message one byte ID */ SKY_PAYLOAD, /* we're in a Skytraq payload */ + SKY_DELIVERED, /* saw last byte of Skytraq payload */ SKY_CSUM, /* saw Skytraq checksum */ + SKY_TRAILER_1, /* saw first byte of Skytraq trailer <0x0D> */ SKY_RECOGNIZED, /* found end of the Skytraq packet */ #endif /* SKYTRAQ_ENABLE */ |