diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-17 07:35:45 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-17 07:35:45 -0500 |
commit | 881be972b47712a69a8b433652fe407717c09331 (patch) | |
tree | b8b75c5fceb5790952260953ef2764f44cb67087 | |
parent | cc4406a8a545e5adce0561feaa9cce63bfdb0cea (diff) | |
download | gpsd-881be972b47712a69a8b433652fe407717c09331.tar.gz |
PPS JSON messages are now visible in client-mode JSON.
-rw-r--r-- | packet.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -504,6 +504,7 @@ static void nextstate(struct gps_packet_t *lexer, unsigned char c) lexer->state = GROUND_STATE; break; case NMEA_RECOGNIZED: + /* FIXME: shouldn't all end-of-NMEA cases collapse into a pushback? */ if (c == '#') lexer->state = COMMENT_BODY; else if (c == '$') @@ -1053,13 +1054,17 @@ static void nextstate(struct gps_packet_t *lexer, unsigned char c) lexer->state = UBX_RECOGNIZED; break; case UBX_RECOGNIZED: + /* FIXME: shouldn't all end-of-UBX cases collapse into a pushback? */ if (c == 0xb5) lexer->state = UBX_LEADER_1; #ifdef NMEA_ENABLE else if (c == '$') /* LEA-5H can and will output NMEA and UBX back to back */ lexer->state = NMEA_DOLLAR; #endif /* NMEA_ENABLE */ - else + else if (c == '{') { + lexer->state = JSON_LEADER; + character_pushback(lexer); + } else lexer->state = GROUND_STATE; break; #endif /* UBLOX_ENABLE */ |