summaryrefslogtreecommitdiff
path: root/driver_ubx.c
Commit message (Collapse)AuthorAgeFilesLines
* A drowning deluge of whitespace hacks.Gary E. Miller2015-04-301-3/+3
|
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-22/+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-4/+4
| | | | | ...no attempt to address the weird cross-platfprm variability we've seen lately. All regression tests pass.
* UBX-MON-VER now prints all info to LOG_INF.Gary E. Miller2015-03-191-5/+31
| | | | | Now outputs the extended version info. subtype is a bit short, just fit in there what we can.
* Break off UBX-MON-VER into separate function.Gary E. Miller2015-03-191-13/+29
|
* Remove some UBX-MON-PVT test code.Gary E. Miller2015-03-191-75/+8
| | | | | Eventually deprecated UBX-MON-SOL goes away and we must finish decoding UBX-MON-PVT. UBX-MON-PVT is not a superset of UBX-MON-SOL.
* Very preliminary cut at decoding UBX-MON-PVTGary E. Miller2015-03-191-1/+90
|
* Placeholder for decode of UBX-NAV-PVTGary E. Miller2015-03-191-0/+11
|
* Comment that UBX-NAV-SOL is depreacted, use UBX-NAV-PVT instead.Gary E. Miller2015-03-191-0/+5
| | | | No idea at what software version UBX-NAV-PVT is present.
* Fix UBX-MON-VER so we get u-blox version string.Gary E. Miller2015-03-181-6/+12
| | | | | | gpsd sends a ton of strings to the GPS on change from NMEA -> UBX mode. Most of it gets lost. So move version request later in the initialization.
* Comment polishing.Eric S. Raymond2015-03-181-2/+2
|
* Add code to request SW and HW Versions from u-blox.Gary E. Miller2015-03-181-10/+36
| | | | | scons check works, but no version working. Hitting same bug esr hit in configuring u-blox.
* Add links to u-blox M8 specs.Gary E. Miller2015-03-181-0/+3
| | | | Now with GLONASS and BeiDou
* One of the float-elimination steps busted something. Revert.Eric S. Raymond2015-03-081-3/+2
|
* A step toards float elimination. No code changes.Eric S. Raymond2015-03-081-2/+3
|
* gpsd-report() -> gpsd_log()Eric S. Raymond2015-03-071-98/+99
| | | | | | | | | | | | | | | | 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.
* Make ntpmon autoconfigure and do subsecond polling.Eric S. Raymond2015-02-251-2/+2
|
* 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.
* Easy splint cleanups. All regression tests pass.Eric S. Raymond2015-01-211-5/+5
|
* 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.
* Almost entirely eliminate use of sats_used array.Eric S. Raymond2015-01-101-1/+1
| | | | | | | 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.
* Another minor code simplification. All regression tests pass.Eric S. Raymond2015-01-101-2/+3
|
* Code simplification.Eric S. Raymond2015-01-101-13/+12
|
* Fix a bug that produced duplicate satellite IDs in psesudo-NMA GSA.Eric S. Raymond2015-01-101-3/+1
| | | | Required one check file rebuild. All regressuin tests pass.
* Refactor representation of satellite data into an array of structs...Eric S. Raymond2014-09-221-9/+13
| | | | | | | | | | | | | | | | | | ...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-56/+56
| | | | All regression tests pass.
* The big leap. Most instances of gpsd_report are replaced...Eric S. Raymond2014-08-271-56/+56
| | | | | | | | | | | | | | | | ...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-56/+56
| | | | | | 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-6/+6
| | | | All regression tests pass.
* Minor refactoring step in the UBX driver.Eric S. Raymond2014-08-271-8/+8
| | | | A move towards eliminating reverse linkage.
* splint cleanup. All regression tests pass.Eric S. Raymond2014-08-251-2/+2
|
* Split firmwqre version query out of the init method.Eric S. Raymond2014-08-251-3/+11
| | | | | | 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-4/+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.
* Fix ubx_mode link error when reconfigure=falseSimon Dawson2014-01-031-0/+4
| | | | | | | | | | | | | | | | When reconfigure is false, the link step fails as follows. /scratch/peko/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -o gpsd -pthread --sysroot=/scratch/peko/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot gpsd.o ntpshm.o shmexport.o dbusexport.o -L. -L/scratch/peko/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lrt -lbluetooth -ldbus-1 -lgpsd -lusb-1.0 -lbluetooth -lgps -lm -ldbus-1 -lpthread -lrt ./libgpsd.so: undefined reference to `ubx_mode' collect2: error: ld returned 1 exit status scons: *** [gpsd] Error 1 scons: building terminated because of errors. The problem appears to be a failure to guard a call to ubx_mode with a RECONFIGURE_ENABLE ifdef. Signed-off-by: Simon Dawson <spdawson@gmail.com> Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Silence compiler warning.Eric S. Raymond2013-11-271-1/+1
|
* Get vertical error position and speed estimates from the u-blox driver.Pavel Kirienko2013-11-261-3/+28
| | | | | That is, rather than having to interpolate them. This required two regression-test rebuilds in obvious places.
* Minor correction to use UBX error estimstes.Pavel Kirienko2013-11-201-0/+1
| | | | | | | | | | | Before this patch, the implementation of the u-blox driver parsed the EPX/EPY/EPS values properly, but did not update bitfields SPEEDERR_SET and HERR_SET. Since the mask was not being updated, the estimated accuracy was being immediately overwritten from gpsd_error_model(). Three regression tests were affected and had to be rebuilt.
* gpsctl ID now gets basic version info from u-blox receivers.Eric S. Raymond2013-11-131-0/+5
|
* More consistent ise of LOG_PROG.Eric S. Raymond2013-11-121-1/+1
| | | | This logging level is intended to directly explain accompanying I/O messages.
* Reduce gpsd log verbosity a lot.Eric S. Raymond2013-11-121-35/+35
| | | | | | | | | | 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-3/+3
|
* Virtuous code removal.Eric S. Raymond2013-11-121-18/+0
| | | | | The can't-turn-off-NMEA bug went away. I think it was the port ID fix to the u-blox driver, though I don't see how. I'll take it....
* We can now change baud rates on the GR601-W.Eric S. Raymond2013-11-121-12/+34
| | | | | | | This required some unfortunate klugery because the GR601-W is a USB device that nevertheless has port ID 1 in the u-blox CFG-PRT message (associated with the primary USART) rather than port ID 3 which is what u-blox USB would give it.
* Fix a truly stupid u-blox driver bug. Make baud rate change effective.Eric S. Raymond2013-11-111-54/+54
|
* u-blox name cleanup. All regression tests pass, PPS is live.Eric S. Raymond2013-11-091-2/+2
|
* Typo fixes.Eric S. Raymond2013-11-091-2/+2
|
* Typo fix.Eric S. Raymond2013-11-091-1/+1
|
* uBlox -> u-blox; the company does not biicapitalize its name.Eric S. Raymond2013-11-091-4/+4
|
* Typo fixes. All regression test pass. PPS is live.Eric S. Raymond2013-11-081-1/+1
|