summaryrefslogtreecommitdiff
path: root/packet.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a truly obscure bug in the packet getter.Eric S. Raymond2009-12-061-4/+8
| | | | | | It was eating #-comments after NMEA packets. Wouldn't matter, except gpsfake now interprets a magic comment to control sentence timing. All regression tests pass.
* Include the whole config file in gpsd.h.Eric S. Raymond2009-11-201-1/+0
| | | | | | | That is, instead of sectioning out two little config defines and putting them in. This makes gpsd.h self-copntained (e.g. in case it gets installed as a library header) and means we can get rid of most inclusions of it.
* flush the input buffer if it gets too full and nothing is detected.Chris Kuethe2009-11-191-0/+6
| | | | | particularly useful when the packet sniffer guessed wrong and thinks baud spew is TSIP. from "edo1" in irc.
* Fix some whitespace glitches found while experimenting with indent(1).Eric S. Raymond2009-11-171-3/+3
| | | | All regression tests pass.
* Fix #ifdef TSIP nesting from Chris Adams's TSIP-validation patch.Gary E. Miller2009-11-131-1/+1
| | | | | Still not found what recent patch broke Garmin USB binary and Garmin Serial binary
* Splint cleanup. All regression tests pass.Eric S. Raymond2009-11-111-5/+5
|
* improved TSIP validation, from Chris AdamsChris Kuethe2009-11-111-1/+33
|
* be a little more tolerant of acceptable packet sizeChris Kuethe2009-11-051-1/+1
|
* In the wake of the change to use only C99 fixed-length types... Eric S. Raymond2009-10-261-1/+1
| | | | ...splint needs some pacifying. This is part 1. All regressions pass.
* Address Berlios tracker bug #16299: Eric S. Raymond2009-10-121-4/+4
| | | | | Solaris lacks u_int*_t typedefs. Switch to the C99 standard ones. All regression tests pass.
* Fix slightly incorrect information on GLONASS talker IDs.Eric S. Raymond2009-09-221-4/+4
|
* Accept $GN and $GL NMEA prefixes associated with GLONASS.Eric S. Raymond2009-09-211-1/+7
|
* Finally found the right set of exclusions to stop splint from choking.Eric S. Raymond2009-09-111-0/+2
| | | | Now to see if I can trim them any.
* Guard some inclusions that splint doesn't like. Eric S. Raymond2009-09-101-0/+2
| | | | No effect on compilation. All regression tests pass.
* Rename the function to oncore_payload_cksum_length()... Chris Kuethe2009-07-231-7/+8
| | | | | | which is what it actually returns. Using 0 as the invalid packet marker is possible, as every packet has at least a checksum. Some type-casting can then be avoided. >From Hakan Johansson
* More patches by Hakan JohanssonChris Kuethe2009-07-181-35/+37
| | | | | | | | | | | | driver_oncore.c: no ..._detect() function needed dop is in .1 units using macro ONCTYPE to avoid splint warning (also looks better I think) return false from ..._set_speed() packet.c: anti-splint typecast using macro ONCTYPE to avoid splint warnings
* move the oncore packet length tester to where it really should be.Chris Kuethe2009-07-181-4/+59
| | | | prompted by Hakan Johansson
* Make the oncore sniffer use the known lengths of packets.Chris Kuethe2009-07-161-9/+16
| | | | | | This guards against finding 0x0d 0x0a somewhere in the payload. It can happen, and does happen often enough to be annoying. From Hakan Johansson on gpsd-dev
* Rough oncore driver.Chris Kuethe2009-07-161-19/+90
| | | | | | Doesn't do anything useful, but will be handy for people with actual hardware who can hack on the decoders. Doesn't break the regression tests either.
* don't return -1 if ((errno == EAGAIN) || (errno == EINTR));Chris Kuethe2009-07-101-0/+1
| | | | | we treat these as non-errors, so return 0 bytes read. makes reading from pty's much happier
* how could i have possibly screwed up superstar2 detection so badly?Chris Kuethe2009-07-041-3/+6
|
* more TSIP fixesChris Kuethe2009-07-021-1/+3
|
* accept trimble raw measurementsChris Kuethe2009-06-241-1/+1
|
* Make the packet getter a bit more explicit about checksum failures.Eric S. Raymond2009-06-171-1/+1
|
* Comment fixes.Eric S. Raymond2009-06-091-6/+12
|
* Typo fix in comment.Eric S. Raymond2009-06-071-1/+1
|
* Cope with broken \r\r\n packet trailers from the Jackson Labs Firefly-1a.Eric S. Raymond2009-06-071-0/+6
|
* Minor splint cleanups.Eric S. Raymond2009-03-271-1/+1
|
* Explain a tricky issue that might bite us someday.Eric S. Raymond2009-03-271-1/+18
|
* Significant simplification of the packet-getter interface. Eric S. Raymond2009-03-271-5/+10
| | | | | | | | packet_get() now always returns nonzero when it could either read fresh data or assemble a packet from data already read and buffered -- no more returning 0 when it has assembled a packet from buffered data but can't read any new data. I suspect this may have been causing subtle bugs.
* Garmintxt integration patches from Petr Slansky.Eric S. Raymond2009-03-241-4/+32
|
* Check in AIVDM regression tests for sentence types 1-4.Eric S. Raymond2009-03-151-1/+3
|
* The shell of an AIVDM driver.Eric S. Raymond2009-03-091-3/+8
| | | | | This gets packets and delivers them to a stub analyzer, fields parsed out and checksum verified.
* splint cleanup.Eric S. Raymond2009-03-041-5/+5
|
* Quiet down the compiler.Eric S. Raymond2009-03-041-0/+3
|
* Splint cleanup.Eric S. Raymond2009-01-291-1/+3
|
* driver for novatel superstar2. Chris Kuethe2009-01-261-0/+64
| | | | | | | | | not enabled by default yet; i still need to get mode switching working. kinda funny - i bought the superstar last july, and it's taken me nearly six months to even take it out of the antistatic bag. at least the driver isn't vaporware any more (and the only copy of it isn't on my laptop).
* Fix misleading comments.Eric S. Raymond2009-01-131-1/+1
|
* Improve the packet instrumentation slightly.Eric S. Raymond2009-01-121-7/+7
|
* fix format warningsChris Kuethe2009-01-061-8/+9
|
* Merge code for Oceanserver compass from Stefan de Konink.Eric S. Raymond2009-01-041-2/+6
| | | | | It's all conditioned out by #ifdef OCEANSERVER. Some if the probe logic still needs to be written.
* Add a wrapper function around gpsd_hexdump to avoid hexdumping buffers...Chris Kuethe2008-12-271-13/+13
| | | | | | | | ...and copying ascii strings around when they're not going to be printed. This saves quite a lot of CPU. I processed a 50MB ubx binary file. With no "-D" options, this saved nearly 2.2M calls to gpsd_hexdump and the processing time for this file went from 84 seconds to 35 seconds.
* bunch of fixes to ubx, particularly for the ublox5. from Henk FijnvandraatChris Kuethe2008-10-191-0/+6
|
* whitespace fixesChris Kuethe2008-08-031-4/+5
|
* accept tsip packet type 0x48 - system messagesChris Kuethe2008-08-031-0/+4
| | | | | | | | | | | | | gpsd: GPS System Message: 8ODHT4KK0D6R80PMVRUxLK I checked with that guy who produces that poorly photocopied on low-grade paper weekly conspiracy theorist news-rag. He said "ZOMG THE ORBITAL MIND CONTROL RAY HAS BEEN ACTIVATED!!!" :) I have no idea if that's a meaningful message or if my thunderbolt had a brain fart while decoding the real message. Older versions of the TSIP manual say the message is 22 bytes long (this is) and that the GPS spec says it's free-form ASCII (alas, that bit of line/RF noise qualifies.)
* also allow trimble packet 0x5a (raw measurements)Chris Kuethe2008-08-031-0/+2
|
* splint cleanup.Eric S. Raymond2008-07-161-1/+1
|
* Add a packet.c entry point (actually a macro) for testing... Eric S. Raymond2008-07-151-6/+4
| | | | | | ...for the presence of buffered data. Use this to make rtcmdecode work right using the packet getter. This enables it to see RTCM3 packets, though full decoding doesn't yet work.
* Avoid erroneously decrementing the input count on a transient error.Eric S. Raymond2008-07-151-5/+11
| | | | Document some assumptions.
* Bugs can lurk indefinitely in the damnedest places. Eric S. Raymond2008-07-151-11/+17
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes a bonehead error in gpsd's input data management that has been undetected for years because it only showed up reproducibly when one of gpsd's device inputs was connected to a file, *not* an actual GPS constantly streaming data to it. The error was that packet_get() would return 0, signaling end of input in some circumstances, any time a physical read from the device failed or returned 0 - even if there was still data in the packet input buffer. As a result, gpsd could fail to see a random number of bytes at the end of a file source. This probably accounts for sporadic spurious errors associated with short reads in the regression tests. The error was masked when connected to actual GPSes, which would always make more data available for physical read within a second or so. The new test tries to parse out packet data if either the physical read returned > 0 or the packet input buffer is nonempty. Note, this depends on the packet_parse() function shortening the input buffer by at least one byte per call every time, otherwise this test could result in gpsd infinite-looping on an empty buffer.