| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit d1965788249d7e22cdde4021d452cf0dc6c6b9bd.
This breaks my build on Gentoo running gcc 4.9.2
libgps_shm.c: In function 'int gps_shm_read(gps_data_t*)':
libgps_shm.c:122:12: error: no match for 'operator=' (operand types are
'gps_data_t' and 'volatile gps_data_t')
noclobber = shared->gpsdata;
^
libgps_shm.c:122:12: note: candidate is:
In file included from gpsd.h:350:0,
from libgps_shm.c:30:
gps.h:1918:8: note: gps_data_t& gps_data_t::operator=(const gps_data_t&)
struct gps_data_t {
^
gps.h:1918:8: note: no known conversion for argument 1 from 'volatile
gps_data_t' to 'const gps_data_t&'
|
| |
|
|
|
|
|
| |
Now gpsctl, and friends, can return a pretty device name. And avoids
a segfault on empty *device.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
All regression tests pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For some reason the ppsthread no longer tries to open /dev/pps0, Either
before or after this patch.
Here is the current status:
root@raspberrypi:/usr/local/src/GPS/gpsd/gpsd# gpsd -nND 6 /dev/pps0 /dev/ttyAMA0 |& fgrep pps0
gpsd:INFO: stashing device /dev/pps0 at slot 0
gpsd:ERROR: initial GPS device /dev/pps0 open failed
gpsd:INFO: KPPS:/dev/ttyAMA0 checking /sys/devices/virtual/pps/pps0/path,
[... no more output]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For these devices:
1. The hunt loop is disabled.
2. When emitting a PPS report, all other (non-/dev/pps) devices are
checked for in-band time. If no time is found the report is not
emitted. If time is ound its seconds field is incremented by 1 and it
is used
Every PPS from a device resets its online time, which should prevent
/dev/pps devices from timing out too often.
Not yet tested with a /dev/pps device. All regression tests oass.
|
| |
|
|
|
|
|
| |
...no attempt to address the weird cross-platfprm variability we've seen lately.
All regression tests pass.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
All regression tests pass.
|
| |
|
|
|
|
| |
All regression tests pass.
|
|
|
|
|
|
|
|
|
| |
Regression tests pass with nonblocking I/O, but a regression test *rebuild*
fails with timing errors. Much as we want a solution to the select-buzz
problem, this change must go on hold until the root cause of the timing
problems is found and fixed.
Regression tests still pass.
|
|
|
|
| |
All regression tests pass.
|
|
|
|
| |
All regression tests pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All regression tests pass.
Hal Murray thinks we should be opening the device, setting CLOCAL with
tcsetattr() , closing it, and reopening. This is a good idea in
principle but doing it right will require serious preparatory surgery
on the serial.c code.
According to StackOverflow, the specific thing CLOCAL does is disable signaling
the process on CD drop.
The Modem HOWTO says this:
Normally a CD (Carrier Detect) signal (on the CD wire for an external
modem) is [not] required before a serial port can be opened. But if stty has
negated clocal (-clocal), then the port requires CD raised for the
port to open and remain open. Actually, a skilled programmer can write
the program in such a way as to force the port to open even when CD
and clocal say not to. So if stty shows -clocal then there might be a
problem with opening the port. But for dial-in, in some cases you may
want -clocal so that when the remote modem stops sending a carrier and
CD drops, the port will close and terminate all processes running on
it.
The above is internally inconsistent without the inserted "not".
The Gnu C library documentation says:
Macro: tcflag_t CLOCAL
If this bit is set, it indicates that the terminal is connected
"locally" and that the modem status lines (such as carrier detect)
should be ignored.
On many systems if this bit is not set and you call open without
the O_NONBLOCK flag set, open blocks until a modem connection is
established.
If this bit is not set and a modem disconnect is detected, a
SIGHUP signal is sent to the controlling process group for the
terminal (if it has one). Normally, this causes the process to
exit; see 24. Signal Handling. Reading from the terminal after a
disconnect causes an end-of-file condition, and writing causes an
EIO error to be returned. The terminal device must be closed and
reopened to clear the condition.
|
|
|
|
|
|
| |
Also, zero in on shorter delays in the regression tests.
All regression tests pass.
|
|
|
|
|
|
|
| |
This addresses the buzzing-select problem, but the cost is that the GPS
regression tests require longer delays and may hang if the delays are too short.
All regression tests pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
On NetBSD, there's something wrong between gpsd code, select and
termios's VMIN/VTIME. Until debugged, avoid it.
|
|
|
|
|
|
|
|
| |
For the moment, we do nothing with the textual argument to
gpsd_optimize_io(). We'd like to use it to set ICANON mode and let the
kernel do all the line buffering itself. The problem with this is
that VTIME stops working in ICANON, so a binary packet coming up the
wire would result in no further input being seen.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The cygwin headers don't seem to define these. We can still attempt to
work without them.
|
|
|
|
| |
All regression tests pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...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.
|
|
|
|
|
|
| |
A major step towards eliminating reverse linkage.
All regression tests pass.
|
|
|
|
| |
All regression tests pass.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Now we'll know exactly what's being sent on a UBX mode change.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This patch makes them classify as USB source and fixes typos for
bluetooth device.
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
|
| |
|
|
|
|
|
|
|
| |
in the gpsd_get_speed conversion where we lost resetting the speed to
the old speed on exit in serial.c
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
|