summaryrefslogtreecommitdiff
path: root/drivers.c
Commit message (Collapse)AuthorAgeFilesLines
* driver_nmea0813: Add unused sentence types to table.Gary E. Miller2019-03-261-1/+1
| | | | | This cuts down on scary "unknown sentence" warings that freak some people out...
* LICENSE: Update licenses for consistency. No functional changes.Gary E. Miller2018-11-191-1/+1
|
* drivers.c: fix pointer type to remove cc warning.Gary E. Miller2018-09-111-1/+1
|
* Fix a core dump introduced by the previous compiler warning fix.Eric S. Raymond2018-08-091-1/+1
|
* drivers.c: fix compiler warning message from recent commit.Gary E. Miller2018-08-081-1/+2
| | | | The problem comit was: 75677f69153b221da611568be7f578b9e99c5876
* Reject AIVDM armoring containing non-ASCII characters;Eric S. Raymond2018-08-041-0/+9
| | | | that would have to be wrong.
* Add GREIS (Javad) GPS driver.Gregory Fong2018-07-291-0/+13
| | | | | | | | | | | | 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>
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* Clean up C and Python code-checker warnings.Eric S. Raymond2017-09-061-1/+2
|
* Fixes Ill-formed TOFF/PPS packet error in gpsmon.Fred Wright2016-09-221-1/+3
| | | | | | | | | | | | | | | | The code for reporting the combined host address and device address modifies the same 'path' field that it uses to form the combination This was resulting in a growing accumulation of device names until the string became too long. Although the way this code works could use some improvement, a cheap fix is to check for the presence of the device name in the path, and skip it when creating the new one. TESTED: On both OSX and Linux, ran "scons build-all check" and tested gpsmon both with and without the -a option, verifying that it no longer fails and that the reported "device" is the expected combined form. Signed-off-by: Gary E. Miller <gem@rellim.com>
* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999Gary E. Miller2016-08-161-0/+4
| | | | | Sad, C99 did not actually standardize the defines to invoke the standard.
* usleep() is removed from POSIX-2008. Replace with nanosleep()Gary E. Miller2016-08-151-2/+13
| | | | I sure hope I did not drop a zero anywhere...
* Add note about the MTK3339.Eric S. Raymond2016-04-131-3/+12
|
* Add driver_skytraq.c.Gary E. Miller2016-03-291-0/+4
| | | | It grabs packets, but does not decode any yet.
* Autodetect and configure Spectratime iSync deviceMichael Brown2016-02-091-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Spectratime iSync devices comprise a u-blox 6 attached to a separate iSync microcontroller which drives a rubidium oscillator. The oscillator status messages may appear in the middle of the underlying GPS messages; these are handled via the "stashed partial message" support. This patch modifies the u-blox driver's parse_input() method to delegate NMEA messages to generic_parse_input() rather than nmea_parse(). This is done to allow the iSync trigger string to be detected after reactivation despite the "stickiness" of the u-blox driver. The initial delay time in gpsfake is extended from 1.0 seconds to 1.4 seconds to allow for the additional two 200ms delays introduced by the calls to gpsd_set_speed() in isync_detect(). The iSync driver legitimately uses both a probe_detect() method and a trigger string. The guard against such drivers is therefore removed from test_packet.c. The regression test data includes one artificially induced packet collision (where an oscillator status message appears in the middle of a GPS message), since this corner case is difficult to trigger deliberately in normal operation. Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
* Fix very minor bugs revealed by OWASP analysis.Eric S. Raymond2016-01-241-0/+1
|
* [aivdm] expand debugging in aivdm_decodeJon Schlueter2016-01-051-2/+7
| | | | | | add tracing for each of the broken up fields add pad to the tracing that was already there
* [aivdm] Refactor in aivdm_decode for padJon Schlueter2016-01-051-5/+11
| | | | | | | | make the pad local variable actually be number of bits of padding instead of the ASCII value of the number of bits of padding directly. No logic change
* Address Savannah bug #46082 - Can't explicitly build with NMEA drivers.Eric S. Raymond2015-10-011-14/+14
|
* A drowning deluge of whitespace hacks.Gary E. Miller2015-04-301-5/+5
|
* Add a minimal PPS driver.Gary E. Miller2015-04-021-0/+35
| | | | | Now gpsctl, and friends, can return a pretty device name. And avoids a segfault on empty *device.
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-18/+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.
* splint cleanup. Fixes for minor but real issues...Eric S. Raymond2015-03-281-1/+1
| | | | | ...no attempt to address the weird cross-platfprm variability we've seen lately. All regression tests pass.
* Fix more splint: Line expects to suppress X errors, found 0 errorsGary E. Miller2015-03-251-1/+1
|
* Comment cleanup on PMTKGary E. Miller2015-03-201-3/+7
|
* Our PPS expert says some code is useless. Remove it.Eric S. Raymond2015-03-191-17/+2
| | | | All regression tests pass.
* gpsd-report() -> gpsd_log()Eric S. Raymond2015-03-071-75/+79
| | | | | | | | | | | | | | | | 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.
* Pre-release splint/cppcheck/coverity cleanup. All regression tests pass.Eric S. Raymond2015-02-261-1/+5
|
* Prevent multiple path rewrites in gpsmon.Eric S. Raymond2015-02-261-0/+6
|
* BUGFIX: Prevent spurious path rewrites in the JSON passthrough driver.Eric S. Raymond2015-02-241-1/+1
| | | | All regression tests pass.
* Back out the attempt to use VTIME.Eric S. Raymond2015-01-311-19/+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/+19
| | | | Length 0 means the minimum is unknown and the driver should use character I/O.
* Add str_starts_with macro, use it instead of strncmp.Zbigniew Chyla2015-01-211-4/+5
| | | | This change doesn't affect generated binary code.
* Always use sizeof to get array sizeZbigniew Chyla2015-01-131-1/+1
| | | | | | Don't use constant/expression from an array's definition when referring to its size. Eliminates redundancy and avoids problems when array size changes. The change doesn't affect generated code.
* Magic-number elimination. All regression tests pass.Eric S. Raymond2014-09-121-1/+1
|
* Now that the transition is done we can restore the gpsd_report name.Eric S. Raymond2014-08-271-37/+37
| | | | All regression tests pass.
* All gpsd_reportcalls are gone. Only the unused definitins are left.Eric S. Raymond2014-08-271-6/+7
| | | | | | Next, implement labeled reporting and fix up gpson to do the right thing. All regression tests pass.
* The big leap. Most instances of gpsd_report are replaced...Eric S. Raymond2014-08-271-34/+34
| | | | | | | | | | | | | | | | ...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-39/+39
| | | | | | 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-43/+43
| | | | All regression tests pass.
* A steo topwrds eliminating the reverse linkage of gpd_report().Eric S. Raymond2014-08-271-1/+1
| | | | All regression tests pass.
* Split firmwqre version query out of the init method.Eric S. Raymond2014-08-251-2/+19
| | | | | | 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.
* Recreare the driver union, curtting per-device storage requirements.Eric S. Raymond2014-08-241-1/+1
| | | | | | | This time, the NMEA privarte storage is outside the union, so mode-switching won't step on stuff. All regression tests pass.
* Add a minor error check to AIVDM parsing.Eric S. Raymond2014-08-241-1/+5
|
* drivers.c: move extern declaration of driver_nmea200 with other extern ↵Christian Gagneraud2013-11-211-2/+1
| | | | | | declarations Signed-off-by: Christian Gagneraud <chgans@gna.org>
* drivers.c: Remove dead reference to driver_{zodiac, ubx, sirf}_binaryChristian Gagneraud2013-11-211-3/+0
| | | | | | There's no such structures anywhere in the code, remove the extern declarations. Signed-off-by: Christian Gagneraud <chgans@gna.org>
* fix typo in drivers defineMike Frysinger2013-11-211-1/+1
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Suppress path rewrites in one important special case.Eric S. Raymond2013-11-171-20/+23
|
* Reduce gpsd log verbosity a lot.Eric S. Raymond2013-11-121-4/+8
| | | | | | | | | | Way too much logging was happening at LOG_IO level, which is intended for watching data traffic in and out of the daemon rather than all the minutiae of data analysis - that's LOG_DATA. Also, LOG_DATA gets pushed down two levels. The effect is that -D 5 means exactly what it did, but for purposes other than driver debugging -D 4 now suffices.
* Rename and rationalize driver table instances. No logic changes.Eric S. Raymond2013-11-121-60/+67
|