summaryrefslogtreecommitdiff
path: root/driver_zodiac.c
Commit message (Collapse)AuthorAgeFilesLines
* Shield FreeBSD from standards compliance.Gary E. Miller2016-09-071-0/+5
| | | | | gpsd now compiles, and runs scons check, with no warnings on FreeBSD.
* If you specify XOPEN version, you must specify POSIX version.Gary E. Miller2016-08-161-0/+2
| | | | | | This fixes 32-bit Gentoo on RasPi. All regression tests pass.
* C99 requires _XOPEN_SOURCE 500 for M_LN2Gary E. Miller2016-08-151-0/+5
|
* PPSTIME -> NTPTIMEGary E. Miller2016-04-241-1/+1
| | | | | NTPTIME is from the serial stream, it never had anything to do with PPS and it just confused everyone.
* A drowning deluge of whitespace hacks.Gary E. Miller2015-04-301-1/+1
|
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-14/+0
| | | | | | | | | | | | | | | | | | | 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.
* Minor efficiency improvement.Eric S. Raymond2015-03-181-3/+9
|
* One of the float-elimination steps busted something. Revert.Eric S. Raymond2015-03-081-1/+1
|
* A step toards float elimination. No code changes.Eric S. Raymond2015-03-081-1/+1
|
* gpsd-report() -> gpsd_log()Eric S. Raymond2015-03-071-29/+29
| | | | | | | | | | | | | | | | 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.
* Back out the attempt to use VTIME.Eric S. Raymond2015-01-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Matthias Drochner at http://lists.lysator.liu.se/pipermail/lsh-bugs/2003q4/000151.html: I thought I'd give lsh a try, just to see how it compares to openssh... The client didn't work well on NetBSD, got a message like "unexpected EWOULDBLOCK" on each keystroke. Looked a bit deeper and found that stdin is set to O_NONBLOCK and a raw tty mode with c_cc[VMIN] > 1 and c_cc[VTIME] > 0. I'll append a little test program which does the same. I've tried it on 3 operating systems (Linux, NetBSD, Digital UNIX), and it behaves differently on each: -on Linux, if a key is pressed, the read returns immediately with that one character -on NetBSD, the read returns with no data but EWOULDBLOCK -on D'UNIX, the poll() doesn't teturn before 4 keypresses are done; the read() returns these 4 characters Indeed, in SUSv2's termios page is a sentence which says that if both O_NONBLOCK and VTIME>0 are set, the behaviour is more or less undefined. I've solved my immediate problems by setting VMIN to 1 instead of 4 in unix_interact.c:do_make_raw(), but VTIME is still pointless, so I wouldn't call this a clean solution. All regression tests pass.
* Add a minimum packet length to every driver.Eric S. Raymond2015-01-291-0/+1
| | | | Length 0 means the minimum is unknown and the driver should use character I/O.
* Prevent uninitialized-field lossage in the Zodiac driver.Eric S. Raymond2015-01-241-2/+0
|
* Coverity/splint cleanup.Eric S. Raymond2015-01-211-0/+3
| | | | | Turned up a bug in where a counter was incremented un the Navcom driver; this required one test rebuild.
* Easy splint cleanups. All regression tests pass.Eric S. Raymond2015-01-211-4/+4
|
* Add str_{,v}appendf, use it everywhere.Zbigniew Chyla2015-01-211-2/+2
| | | | This change doesn't affect generated binary code.
* Almost entirely eliminate use of sats_used array.Eric S. Raymond2015-01-101-9/+6
| | | | | | | Instead, set the used member in the satellites array directly where possible. The NMEA0183 and TSIP drivers still need a local equivalent. This changes pseudo-NMEA GSA output in several binary-protocol tests.
* Better way to avoid glibc dependency.Eric S. Raymond2014-09-291-1/+1
| | | | | | | Returns us to something amost identical to the original code. Sigh. Timezones are a swamp. All regression tests pass.
* Remove some custom code, at the cost of introducing a glibc depenency.Eric S. Raymond2014-09-251-1/+1
| | | | Dependency soon to be fixed. All regression tests pass.
* Refactor representation of satellite data into an array of structs...Eric S. Raymond2014-09-221-12/+12
| | | | | | | | | | | | | | | | | | ...from a set of parallel arrays. This change flushed out a longstanding bug in the computation of DOPs for estimated error bars. Some test-load rebuilds were required: geostar-geos1m-binary.log.chk: With this change error estimates are computed and reported. trimble-lassen_iq-3dfix.log, trimble-lassen_iq-3dfix.log: the change revealed a bug in the computation of satellite-seen bits. Error estimates did not change. navcom.log: Error estimates changed. With these rebuilds, all regression tests pass.
* Now that the transition is done we can restore the gpsd_report name.Eric S. Raymond2014-08-271-7/+7
| | | | All regression tests pass.
* The big leap. Most instances of gpsd_report are replaced...Eric S. Raymond2014-08-271-7/+7
| | | | | | | | | | | | | | | | ...with calls to gps_notify(), which indirects to its output method through a slot in an errout structure. Usually the errout structure lives inside the session context, but because struct errout_t is its own thing this does not have to be the case. One large clique of gpsd_notify() calls, in packet.c and isgps.c, looks at a struct errout_t copy in a lexer control block This change is not complete. Remnant gpsd_report calls need to be changed, and gpsmon needs to be tweaked so that the struct_error_t in its context is a non-defaukt hook updating the cuses display rather than simply dumping to stderr. Also the report label functionality needs to be added. All regression tests pass.
* Introduce struct errout_t to encapsulate error-reporting hooks.Eric S. Raymond2014-08-271-7/+7
| | | | | | A major step towards eliminating reverse linkage. All regression tests pass.
* Structure member name change: packet -> lexer. No logic changes.Eric S. Raymond2014-08-271-7/+7
| | | | All regression tests pass.
* Split firmwqre version query out of the init method.Eric S. Raymond2014-08-251-0/+1
| | | | | | This enables us to force readonly off while it's being called. The practical effect is that gpsmon can get a firmware version (if this is possible) without reconfiguring the device.
* Drop the obsolete tag field from JSON output. Bump the minor protocol number.Eric S. Raymond2014-08-241-3/+0
| | | | | | | Required a regression-test rebuild, of course. The field is still set by the TSIP and SiRF drivers; the SiRF driver actually uses it. It may be possible to eliminate the TSIP uses, but so far attempting this has produced odd regression-test failures.
* Reimplement Zodiac control-send safely for word-oriented architectures.Eric S. Raymond2014-08-211-1/+10
| | | | | | | | | | This was a bug revealed by Debian porterbox testing. We used to use a cast from (char *) to (unsigned short *) that was problematic on word-oriented architectures like the PowerPC. Instead, memcpy the message data to a word array, which the compiler will create with correct alignment. All regression tests, cppcheck, and splint pass.
* Remove a dead initialization, as reported by clang's scan build.Bernd Zeimetz2013-12-071-1/+1
|
* Rename and rationalize driver table instances. No logic changes.Eric S. Raymond2013-11-121-2/+2
|
* Full splint cleanup. Partial cppcheck cleanup.Eric S. Raymond2013-11-051-4/+3
|
* Contain the assumption that time hinting is done to NTPD.Eric S. Raymond2013-10-311-6/+6
| | | | | | | Because it might be going to chrony. Or something else. No logic changes, just name changes and one new derived #define, TIMEHINT_ENABLE.
* Revert "Separate ntpd support from chrony support, step 1."Eric S. Raymond2013-10-301-6/+6
| | | | We'll have to sneak up on this change more slowly.
* Separate ntpd support from chrony support, step 1.Eric S. Raymond2013-10-301-6/+6
| | | | | | | | | | | | | ntp_offset becomes time_offset. There is a new config symbol CHRONY_ENABLE; most time service code is npw controlled by TIMESERVICE_ENABLE. The file ntpshm.c becomes timeexport.c This change is not complete. More disentanglement has to be done inside timeexport.c itself; at the moment enabling one but not both of ntpshm or chrony will probably break its compile. The point of getting this commit out is so Gary will see the new baseline code ASAP. All regression tests pass.
* splint cleanup. Regression tests pass and PPS live-tests correctly.Eric S. Raymond2013-10-291-3/+3
|
* Cleanup fixes. There was a typo in the last change to the Zodiac driver.Eric S. Raymond2013-10-261-2/+2
| | | | All regression tests pass.
* Remove an endianness assumption.Eric S. Raymond2013-10-261-19/+10
|
* More efficiebt sticky-flagging.Eric S. Raymond2013-10-151-1/+1
|
* Remove dead code and clean up. All regression tests pass.Eric S. Raymond2013-10-151-37/+3
| | | | | Under the new transition rules, the Zodiac driver can never see an NMEA packet.
* OK, visualize as a method was a bad idea. All regression tests pass.Eric S. Raymond2013-10-141-3/+0
|
* Create driver slot and scons option for a visualizer driver method.Eric S. Raymond2013-10-131-0/+3
|
* Change gpsd_report to no longer use a global. All regression tests pass.Eric S. Raymond2013-09-291-10/+18
| | | | | | | | This is a large, ugly change. But without it we can't troubleshoot the ICP/IP-source initialization bug properly - colliding definitions of gpsd_report() were interfering with error reporting early in gpsd runs. More cleanup work remains to be done, but at least this is working.
* Lose the assumption that socket_t is an integer.Eric S. Raymond2012-09-221-1/+1
|
* Nuke trailing whitespace in C source.Eric S. Raymond2012-09-071-6/+6
|
* Remove now-unneeded inclusion.Eric S. Raymond2012-05-191-1/+10
|
* Regularize some names.Eric S. Raymond2011-04-011-8/+8
|
* gps_maskdump() has been a CPU hog. Drastically reduce the number of calls...Eric S. Raymond2011-03-311-2/+2
| | | | | ...and guard them with debug level so they won't be done when the output would never be shipped anywhere.
* Re-identify most *_IS flags with corresponding *_SET flags.Eric S. Raymond2011-03-271-6/+6
| | | | | | | | | | | Required so clients looking at flag masks in data exported via the shared-memory interface will see the right thing. These were separated originally in order to avoid pushing the reqyuired width of the gpsdata.set flag mask over 32 bits. It became 64 bits in the Version 5 API change, so that constraint went away. All regression tests pass.
* Make all drivers set the PPSTIME_IS mask where appropriate. It's not yet used.Eric S. Raymond2011-03-231-2/+2
| | | | All regression tests pass.
* And still more double -> timestamp_t moves.Eric S. Raymond2011-03-101-1/+1
| | | | All regression tests pass, splint passes.
* Remove pass_rtcm(),Eric S. Raymond2011-02-271-2/+2
| | | | | Replace it wuth what it calls, gpsd_write(). Requiresd only a prototype tweak and some casts, no logic changes. All regression tests pass.