diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-02-05 07:04:40 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-05 22:37:15 -0500 |
commit | da4b498f0afbd5c1ae1e8585e7fc42620109256e (patch) | |
tree | 39aef2ef282fc5005979311b758a6e4b5472f874 /packet.c | |
parent | 2d8263172370f207311479dc77c6164348b011a5 (diff) | |
download | gpsd-da4b498f0afbd5c1ae1e8585e7fc42620109256e.tar.gz |
Add YX as a recognized NMEA packet leader. Seen on Airmar PB100.
All regression tests pass.
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -101,6 +101,7 @@ PERMISSIONS * $TI -- Turn indicator (Airmar PB200). * $EC -- Electronic Chart Display & Information System (ECDIS) * $SD -- Depth Sounder + * $YX -- Transducer (used by some Airmar equipment including PB100) * $P -- Vendor-specific sentence * * !AB -- NMEA 4.0 Base AIS station @@ -357,6 +358,8 @@ static void nextstate(struct gps_lexer_t *lexer, unsigned char c) lexer->state = ECDIS_LEAD_1; else if (c == 'S') lexer->state = SOUNDER_LEAD_1; + else if (c == 'Y') + lexer->state = TRANSDUCER_LEAD_1; #ifdef OCEANSERVER_ENABLE else if (c == 'C') lexer->state = NMEA_LEADER_END; @@ -590,6 +593,12 @@ static void nextstate(struct gps_lexer_t *lexer, unsigned char c) else lexer->state = GROUND_STATE; break; + case TRANSDUCER_LEAD_1: + if (c == 'X') /* Transducer leader accepted */ + lexer->state = NMEA_LEADER_END; + else + lexer->state = GROUND_STATE; + break; #ifdef TRIPMATE_ENABLE case ASTRAL_1: if (c == 'S') { |