summaryrefslogtreecommitdiff
path: root/packet.c
Commit message (Collapse)AuthorAgeFilesLines
* packet.c: Remove an odd FALLTHROUGH. All tests pass.Gary E. Miller2018-12-271-1/+3
|
* Replace gnu-ism: __attribute__ ((fallthrough));Gary E. Miller2018-12-271-1/+1
| | | | | | | | __attribute__ ((fallthrough)); is only in GCC after version 7. Not supported by other cc, and in fact throws warnings on other cc. The comment "/* FALLTHOUGH */" has the same effect when -Wimplicit-fallthrough=X is used, with X being 1, 2, 3, or 4.
* LICENSE: Update licenses for consistency. No functional changes.Gary E. Miller2018-11-191-1/+1
|
* packet.c: fix a cppcheck nit.Gary E. Miller2018-09-251-1/+2
|
* Add GREIS (Javad) GPS driver.Gregory Fong2018-07-291-15/+138
| | | | | | | | | | | | All functional changes inside "#ifdef GREIS_ENABLE" Includes new regression tests. All regressions tests pass. Developed by Gregory Fong, with help and support from Virgin Orbit. Signed-off-by: Gary E. Miller <gem@rellim.com>
* packet.c: Prevent infinite loop in packet engine.Gary E. Miller2018-07-131-2/+14
| | | | | | The packetizer could get stuck in TSIP mode forever. Thanks to Virgin Orbit for their support fixing this bug.
* Support Galileo $GA... talkers and fix a couple of $GB casesChris Lawrence2018-06-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | Now that the Galileo constellation is live, the NMEA 4.1 standard appears to have standardized on the "$GA..." prefix for Galileo-specific messages. The lexer currently filters these out; this patch ensures they go through to e.g. gpspipe -r. (I tore my hair out for days trying to figure out why these were not being passed through even though I could see them using screen etc.) Also added logic to the GSA and GSV message parsing to account for the Galileo messages. It probably needs more work to match up satellite numbers between the GSA and GSV messages and to account for the GNSS type field in NMEA 4.1, but it's a start at least. I also fixed a couple of situations where the 'GB' prefix was being ignored even though 'BD' was not. This leads to a regression in test/daemon/beidou-gb.log, but the "regression" is actually incorrect old behavior (JSON messages omitting BeiDou satellites) exposed by the patch. Signed-off-by: Gary E. Miller <gem@rellim.com>
* Suppress GCC 7.3.0 fallthrough warnings in intentional cases.Eric S. Raymond2018-06-151-1/+1
|
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* Reverts broken portion of old character pushback change.Fred Wright2017-03-051-1/+1
| | | | | | | | | | | | | | | | | | | This one instance of the 63 character-pushback changes in commit fbaaaa76 broke the packet-regress test, though that was masked due to another bug's causing that test to be disabled. With this instance reverted, the test passes again. It's not entirely clear why a change within Zodiac-specific code broke one SiRF test and two Evermore tests, but that's empirically the case. This change affects one daemon regression test. The ublox-8 test begins with a $GPRMC sentence preceded by a bunch of garbage. The broken version of packet.c skips this sentence, while the fixed version recognizes it. The test data has been updated accordingly. TESTED: Manually ran the packet-regress test successfully. Ran "scons build-all www check".
* Fix too small buffers. Hex is 2x + 1 the size of binary.Gary E. Miller2016-09-011-7/+7
|
* Decode SkytTraq undocumented $STI sentence.Gary E. Miller2016-07-211-0/+2
| | | | | | | Eric will gag at my abuse of the parser, but I'm not up to a major resturcture today. Not sure how to output the error in JSON.
* Another step to decode SkyTraq $STI.Gary E. Miller2016-07-211-0/+3
|
* Fix typoHal Murray2016-07-181-1/+1
| | | | Signed-off-by: Gary E. Miller <gem@rellim.com>
* TSIP: Add support for messages 0x5d and 0x6cNuno Goncalves2016-07-181-7/+33
| | | | | | | | | | 0x5d: GNSS Satellite Tracking Status (multi-GNSS operation) 0x6c: Satellite Selection List Still needs a regressions test. Signed-off-by: Gary E. Miller <gem@rellim.com>
* TSIP: improve commentsNuno Goncalves2016-07-181-11/+39
| | | | Signed-off-by: Gary E. Miller <gem@rellim.com>
* Add driver_skytraq.c.Gary E. Miller2016-03-291-1/+1
| | | | It grabs packets, but does not decode any yet.
* Parse Skytraq packets to inbuffer.Gary E. Miller2016-03-291-3/+81
| | | | No packet decoder yet.
* Add support for stashed partial messagesMichael Brown2016-02-091-2/+76
| | | | | | | | | | The Spectratime iSync GRClok and LNRClok devices generate NMEA-format status packets, which report the status of the GPS-disciplined rubidium oscillator. These packets are inserted randomly into the middle of packets from the embedded u-Blox GPS. Add support for a stash buffer, used to hold the initial portion of interrupted NMEA packets.
* Address Savannah bug #46082 - Can't explicitly build with NMEA drivers.Eric S. Raymond2015-10-011-8/+8
|
* More trailing whitespace fixups.Gary E. Miller2015-04-301-7/+7
|
* Addresses Savannah bug #44740: More talkers for AIS VDM/VDO.Kurt Schwehr2015-04-061-0/+12
| | | | All regression tests pass.
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-21/+2
| | | | | | | | | | | | | | | | | | | The proximate cause was that we've been seing emission of error messages that were randomly and disturbingly variable across different environments - notably Raspbian and Gentoo splint gave nontrivially different results than Ubuntu 14.10 splint. And this was *not* due to Ubuntu patches! A pristine splint built from the 3.1.2 tarball on Ubuntu didn't match the Raspbian and Gentoo results either. But this has been coming for a while. Easy access to more modern static analyzers such as coverity, scan-build and cppcheck has been decreasing the utility of splint, which is unmaintained and somewhat buggy and not easy to use. Only file not cleaned is ppsthread.c, because Gary has been working on it during this cleanup. All regression tests pass. PPS observed live on GR601-W.
* gpsd-report() -> gpsd_log()Eric S. Raymond2015-03-071-113/+113
| | | | | | | | | | | | | | | | This change is done so we can add a "log" hook to the pps_thread_t structure (this is not done yet) and harmonize with the name of the outer logging function. If that name had been left as gpsd_report() there would have been scope for bad confusion with the report_hook member. Also, remove two stray duplicative printf calls from the NMEA2000 driver (drivers shouldn't have printfs!) and fix one typo. This is a step towards factoring out ntplib. For that to happen, the PPS thread code needs to be decoupled from the core session structure. No logic changes. Object compatibility preserved. All regression tests pass.
* Code to accommodate alternat Beidou talker ID of $GB. Also, add a test for it.Eric S. Raymond2015-03-021-1/+4
| | | | All regression tests pass.
* Update a comment on talker IDs.Eric S. Raymond2015-02-281-0/+1
|
* Full support for Beido and QZSS constellations in NMEA0183 skyviews.Eric S. Raymond2015-02-281-0/+17
| | | | | All regression tests pass. Required one test rebuild for QZNSS; Beidou test added.
* splint cleanup. All regressiion tests pass.Eric S. Raymond2015-02-091-3/+2
|
* In the packet getter, fix an erroneous RTCM2 state transition.Eric S. Raymond2015-02-091-6/+14
| | | | | | This fixes the last case where # EOF was not being recognized. All regression tests pass.
* Implement character pushback and state to ground without packet disposal...Eric S. Raymond2015-02-081-63/+63
| | | | | | | | | | | | | | | | | | | | ...for most packet types. Attempting to make *all* character pushbacks do this breaks the following tests: test/daemon/ac12_binary.log test/daemon/gp-320fw-2019-04-07-coldboot.log test/daemon/naujoks-ntrip.log test/daemon/naujoks-rtcm2.log test/daemon/rtcm2.log test/daemon/triton400.log Someday we should figure out why, but it is not very urgent as the capability is mostly just useful for faster recovery from garbage data on the wire. However, this change does have significant impact on the test framework. It should make recognition of the "# EOF\r\n" token injected by gpsfake reliable even in a binary packet stream.
* Machinery for doing true character pushback without packet disposal.Eric S. Raymond2015-02-081-86/+91
| | | | All regression tests pass.
* Improved instrumentation. All regression tests pass.Eric S. Raymond2015-02-081-6/+13
|
* Improve the ability of the packet analyzer to recognize control comments...Eric S. Raymond2015-02-081-74/+74
| | | | | | | ...including the "# EOF" generated by gpsfake. The case that was sometimes being mishandled was "# EOF" just after a binary packet end. All regression tests pass.
* Refactoring step: make character_pushback take a new-state argument.Eric S. Raymond2015-02-081-40/+26
| | | | All regression tests pass.
* Add YX as a recognized NMEA packet leader. Seen on Airmar PB100.Eric S. Raymond2015-02-051-0/+9
| | | | All regression tests pass.
* Comment typo fix.Eric S. Raymond2015-01-311-1/+1
|
* Add str_starts_with macro, use it instead of strncmp.Zbigniew Chyla2015-01-211-5/+6
| | | | This change doesn't affect generated binary code.
* Adding missing PASSTHROUGH_ENABLE ifdef guards in packet.cJon Schlueter2015-01-081-2/+8
| | | | | | scons passthrough=false was failing on several missing ifdef guards for JSON_LEADER blocks. Added matching ifdef guards to allow it to compile cleanly
* Fix RTCM2 detection in packet.cAhti Heinla2015-01-081-0/+6
| | | | | | | | | | | | | | | | | Regression tests pass. Author's notes: RTCM2 support seems to be practically broken, if the stream frequently includes the 0x40 byte. This byte causes packet.c to temporarily think it is an AT1 stream, and stop calling rtcm2_decode() while it thinks so. I have an RTCM stream from station id 0, and this particular station ID causes the 0x40 byte to appear in virtually every RTCM message, so for that stream, I have to wait through hundreds of RTCM messages before it is positively identified and RTCM decoding starts to work. Patch attached, works for me.
* Silence compiler warnings about array subscripts of type 'char'Matt2014-09-101-3/+3
| | | | | | | | | | | | | | | | | | | | Cygwin GCC complains about code like isprint(c), where c is of type char. The isX() and toX() functions/macros (ISO C allows either) all accept an int, whose value should be either that of an unsigned char, or the special value EOF (== -1). So cast to unsigned char each argument to isprint, tolower, etc. Silences several warnings of the form: gpsutils.c: In function 'safe_atof': gpsutils.c:90:5: warning: array subscript has type 'char' [-Wchar-subscripts] while (isspace(*p)) { ^ gpsutils.c:188:2: warning: array subscript has type 'char' [-Wchar-subscripts] while (isdigit(*p)) { ^
* Fix incorrect comment.Eric S. Raymond2014-09-061-1/+1
|
* Now that the transition is done we can restore the gpsd_report name.Eric S. Raymond2014-08-271-34/+34
| | | | All regression tests pass.
* Introduce struct errout_t to encapsulate error-reporting hooks.Eric S. Raymond2014-08-271-60/+39
| | | | | | A major step towards eliminating reverse linkage. All regression tests pass.
* Eliminate gpsd_report() from isgps.c. All regression tests pass.Eric S. Raymond2014-08-271-1/+1
|
* Modify packet.c so it no longer requires gpsd_report().Eric S. Raymond2014-08-271-34/+56
| | | | | | This is a large step towards eliminating the reverse linkage of gpsd_report(). Temporarily, it means that gpsmon will not redirect these messages to the screen display properly. This will be fixed later.
* Follow throughon a previous name change. No logic changes.Eric S. Raymond2014-08-271-1/+1
| | | | All regression tests pass.
* Structure member name change: packet -> lexer. No logic changes.Eric S. Raymond2014-08-271-10/+10
| | | | All regression tests pass.
* Remove some obsolete FIXMEs.Eric S. Raymond2014-08-241-2/+0
|
* Support for some unusual NMEA 4.0 AIS talker IDs.Eric S. Raymond2014-05-201-4/+23
|
* Support for, and documentation of, some unuusual AIS talker IDs.Eric S. Raymond2014-05-161-12/+17
|