summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2008-10-19 05:44:39 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2008-10-19 05:44:39 +0000
commitc5443f7a51349207527de652f618059692616ca3 (patch)
tree058ad2d722092080cfb63a511c94401a3fcaf5e9 /packet.c
parentdf84a902b82731c7a42f7c546223e8ac4063d415 (diff)
downloadgpsd-c5443f7a51349207527de652f618059692616ca3.tar.gz
bunch of fixes to ubx, particularly for the ublox5. from Henk Fijnvandraat
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/packet.c b/packet.c
index f829ad09..a42593b3 100644
--- a/packet.c
+++ b/packet.c
@@ -272,6 +272,10 @@ static void nextstate(struct gps_packet_t *lexer,
lexer->state = NMEA_DOLLAR;
else if (c == '!')
lexer->state = NMEA_BANG;
+#ifdef UBX_ENABLE
+ else if (c == 0xb5) /* LEA-5H can and will output NMEA and UBX back to back */
+ lexer->state = UBX_LEADER_1;
+#endif
else
lexer->state = GROUND_STATE;
break;
@@ -668,6 +672,8 @@ static void nextstate(struct gps_packet_t *lexer,
case UBX_RECOGNIZED:
if (c == 0xb5)
lexer->state = UBX_LEADER_1;
+ else if (c == '$') /* LEA-5H can and will output NMEA and UBX back to back */
+ lexer->state = NMEA_DOLLAR;
else
lexer->state = GROUND_STATE;
break;