[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] State of GPSD
From: |
Greg Troxel |
Subject: |
Re: [gpsd-dev] State of GPSD |
Date: |
Fri, 05 Sep 2014 10:25:00 -0400 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix) |
address@hidden (Eric S. Raymond) writes:
> * The PPS code still needs careful review. The argument over the
> right way to compute offset needs to be resolved *and the resolution
> documented*.
I think there are two PPS issues. One is the offset issue, and I don't
have anything useful to say now.
The other is the TIOCMIWAIT detangling. Gary and I have discussed this,
mostly on list, and i think we are in agreement. Basically
* The code currently has ifdefs around TIOCMIWAIT usage. That makes it
build pretty much everywhere that supports either TIOCMIWAIT or
RFC2783.
* There is code to sanity check results that is currenly under the
TIOCMIWAIT ioctl. This is wrong and the code that determines the
offset (via RFC2783 or TIOCMIWAIT) should be separated from the code
that considers whether the offsets/edges are ok.
* The code currently, at least I think, relies on TIOCMIWAIT to wait for
an edge, because RFC2783 doesn't require the system to wait, and
apparently neither Linux nor NetBSD waits.
So tasks are:
* refactor the consider-edges code, and have it use variables which are
not conditional on either sampling mechanism.
* Alter the main loop to function when only RFC2783 is present, but
retain the efficiency of using TIOCMIWAIT when present. Also, keep
allowing it to function when TIOCMIWAIT but not RFC2783 is present.
For bonus points, try to use RFC2783 waiting, when present. But I'm
not sure there are any implementations.