summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-05 07:04:40 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-05 22:37:15 -0500
commitda4b498f0afbd5c1ae1e8585e7fc42620109256e (patch)
tree39aef2ef282fc5005979311b758a6e4b5472f874 /packet.c
parent2d8263172370f207311479dc77c6164348b011a5 (diff)
downloadgpsd-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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/packet.c b/packet.c
index 2716acc5..cf88515b 100644
--- a/packet.c
+++ b/packet.c
@@ -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') {