summaryrefslogtreecommitdiff
path: root/gps
Commit message (Collapse)AuthorAgeFilesLines
* gpsfake: Avoid duplicated output after daemon death.Fred Wright2018-12-281-1/+2
| | | | | | | | | | | | Although the client read() method provides a return value to indicate that daemon output has become unavailable (due to its death), the run() method in fake.py was ignoring it, and just repeatedly outputting the old string until it eventually noticed the death. It now pays attention to the failure return. TESTED: All tests pass. Quitting the daemon while stopped at a breakpoint no longer spews duplicated output for a while.
* gpsfake: Notice when daemon dies.Fred Wright2018-12-281-0/+4
| | | | | | | | | | | | Death of the daemon (after initial connection) wasn't being noticed, so that the daemon dying (e.g., by quitting it from a debugger) left gpsfake looping and spewing output. This puts an alive check in the main loop, as well as in an inner loop that's sometimes relevant. TESTED: Quit the daemon after stopping at breakpoints in a couple of different cases; gpsfake now quits with an error. It does still spew a bunch of duplicated output in some cases, though.
* Decreases OSX Write_PAD.Fred Wright2018-12-271-1/+1
| | | | | | | | | | Although there doesn't seem to be any WRITE_PAD value that's 100% reliable, 5ms is usually adequately generous for OSX, and is the override value currently used by MacPorts. The current default 30ms makes some tests way too slow. TESTED: Tests pass on OSX 10.5-10.13.
* gpsfake: Allow timeout to be specified.Fred Wright2018-12-271-4/+6
| | | | | | | | | | | This adds an argument to allow overriding the default 60-second timeout on gpsd's activity. A value of 0 disables the timeout completely. Note that the timeout mechanism is somewhat sloppy, and typically adds about 20s to the value. TESTED: Ran with unspecified (default) timeout, a short timeout, a long timeout, and no timeout, all with reasonable results.
* gpy.py: Bunp minor protocol versionGary E. Miller2018-11-161-1/+1
|
* Update version to 3.19-dev. back to dev cycle.dev-3.19aGary E. Miller2018-10-192-2/+2
|
* Chnage version to 3.18.1release-3.18.1Gary E. Miller2018-10-192-2/+2
|
* 3.19!dev: Change revisions for 3.19~dev cycle.Gary E. Miller2018-10-022-2/+2
|
* Version bump to 3.18 for release.release-3.18Gary E. Miller2018-10-022-2/+2
|
* Versions in C and Python were out of sync.Gary E. Miller2018-10-011-2/+5
| | | | Add notes as reminder for next change.
* Python clients: Opps 3.18~dev, not 3.18-dev.Gary E. Miller2018-10-012-2/+2
| | | | A tilda, not a dash.
* gps/gps.py: pylint cleanupsGary E. Miller2018-09-221-18/+35
|
* gps/fake.py: pylint cleanupsGary E. Miller2018-09-221-4/+15
|
* gps/client.py: pylint cleanupsGary E. Miller2018-09-221-6/+26
| | | | Found a bug. Variable steam s/b stream.
* Python modules: add module docstrings.Gary E. Miller2018-09-224-11/+14
|
* gps/__init__: pep8 nit.Gary E. Miller2018-09-221-1/+1
|
* gps/client.py: fix for Python 3.Gary E. Miller2018-09-211-1/+3
|
* SConstruct: pep8 cleanup, no functional change.Gary E. Miller2018-09-211-1/+1
|
* gps: move Python __version__ to proper place.Gary E. Miller2018-09-212-2/+5
|
* gps.py: add __version__Gary E. Miller2018-09-211-0/+3
| | | | So client can check for matching python module version
* gps/client: Fix Python 3 problem in send().Gary E. Miller2018-09-151-2/+3
|
* gps/misc: Improve polystr() to handle bytearrays.Gary E. Miller2018-09-151-0/+2
|
* gps/client.py: remove ConnectionRefusedError which is Python 3 only.Gary E. Miller2018-09-141-8/+2
| | | | We have to support Python 2 for a bit longer.
* gps/client: Commen that ConnectionRefusedError is not in Python 2.Gary E. Miller2018-09-141-0/+2
| | | | So gps/client crashes on a failed connection.
* client.py: remove debug code that slipped out.Gary E. Miller2018-08-071-3/+3
|
* gps.py: pep8 cleanup.Gary E. Miller2018-07-261-0/+2
| | | | Note the program pep8 is now called pycodestyle
* gps.gps.py: isnan() -> isfinite()Gary E. Miller2018-07-141-6/+8
| | | | Thanks to Virgin Orbit for their support on this patch.
* gps/client.py: Add back in missing defaults.Gary E. Miller2018-06-261-0/+3
| | | | The reconnect patch lost host and port.
* misc.py: Fix for PEP8Gary E. Miller2018-06-201-2/+2
|
* fake.py: Fix for PEP8Gary E. Miller2018-06-201-10/+10
|
* gps/client.py: Fix for PEP8Gary E. Miller2018-06-201-1/+2
|
* [PATCH] [fix] gps/*py now passes `scons check`Daniel_M_Williams2018-05-212-6/+19
| | | | | | Whoops, the auto reconnect patch broke scons check. Signed-off-by: Gary E. Miller <gem@rellim.com>
* re-implement reconnect code in python-client-libraryDaniel_M_Williams2018-05-182-69/+96
| | | | Signed-off-by: Gary E. Miller <gem@rellim.com>
* Client-side Python libraries may automatically reconnectDaniel_M_Williams2018-03-291-0/+16
| | | | | | | | | | - moved WATCH_* options to their own file to deduplicate definition - defaults behavior is to exit-on-failure - activated by calling to `gps.gps(..., reconnect=True)` - refactors stream(...) function to deduplicate processing - added dictionary methods to 'class dictwrapper' Signed-off-by: Gary E. Miller <gem@rellim.com>
* gps/fake.py: code rearrangement to handle pylint complexity warningGary E. Miller2017-07-311-9/+11
|
* fake.py: Fix pylint complaint about a function override.Gary E. Miller2017-07-261-3/+3
| | | | | pylint complains when a class function is overridden with a function taking different arguments.
* gps.py: Silence pylint about a TODO.Gary E. Miller2017-07-261-1/+1
|
* fake.py: remove redundant assignment of self.port.Gary E. Miller2017-07-261-1/+0
|
* gps.py: change FIXME -> TODO. Do the PPS TODO.Gary E. Miller2017-07-261-2/+9
| | | | | | Not sure how to decode class DEVICES yet... pylint does not like FIXME, and not broken, just a TODO (enhancement).
* Fixes some pylint issues.Fred Wright2017-07-144-8/+7
| | | | | | | | | | | This doesn't fix all complaints by pylint, but significantly reduces their number. Ditto for pep8 complaints. Also makes a couple of related cosmetic edits. TESTED: Ran "scons build-all check" with no errors. Both "pylint" and "pep8" targets report fewer issues.
* Fixes bug in gpsfake with default port.Fred Wright2017-07-141-1/+1
| | | | | | | | | | | | The default port number used by gpsfake is (probably incorrectly) specified as a string rather than an integer. The shmkey derivation added in commit 1f209455 expects an integer, causing a failure when the port is not explicitly specified. This fix forces an integer where needed. TESTED: Ran "scons build-all check". Previously failing gpsfake case now works correctly.
* gps/fake.py, gpssim.py: pep8 fixesGary E. Miller2017-07-011-34/+68
|
* gps.py: pep8 fixesGary E. Miller2017-07-011-81/+88
|
* misc.py: pep8 fixesGary E. Miller2017-07-011-22/+28
|
* client.py: pep8 fixesGary E. Miller2017-07-011-3/+10
|
* Makes 'GPSD' SHM IDs unique during regression tests.Fred Wright2017-03-241-3/+11
| | | | | | | | | | | | | | | | | Prior to this change, multiple gpsd instances would normally share a single SHM segment, confusing anyone using it. This was a problem either when running parallel regression tests, or even when running a single test with a system gpsd also running. Now, each gpsd instance launched by fake.py gets a SHM ID of the form 0x4770xxxx, where xxxx is the TCP or UDP port number. The high-order part is 0x4770 ('Gp') instead of 0x4750 ('GP') to ensure that it doesn't collide with the standard 'GPSD'. This does not do anything about 'NTPx' SHM segments. TESTED: Ran "scons -j24 check", and observed many 'Gpxx' SHM segments with ipcs, all disappearing by the end of testing.
* Makes connect failure to dead fake.py daemon more informative.Fred Wright2017-02-191-1/+6
| | | | | | | | | | | This generates a more specific exception when a connect from client_add() fails due to the daemon's having died. Aside from real daemon failures, this also catches some broken valgrind cases. TESTED: Ran "scons build-all check" on OSX. Also ran failing valgrind-audit and observed more informative (and less verbose) backtrace. Note that this is due to an OSX issue with valgrind itself, not the daemon.
* Reworks local exception definitions in fake.py.Fred Wright2017-02-191-15/+11
| | | | | | | | | This reduces duplicated code by using subclasses for local exceptions. It's not entirely clear that limiting __str__() to only certain exceptions is necessary, but it preserves that behavior. TESTED: Ran "scons build-all check" on several platforms.
* Reworks DaemonInstance in fake.py.Fred Wright2017-02-191-72/+80
| | | | | | | | | | | | | | | | | | | | This does two things: 1) It splits DaemonInstance into a base class and subclass, where the base class is a more generic subprogram runner. This makes it easier to add additional program runners without code duplication. 2) It switches from os.system() to subprocess.Popen() as the mechanism for running subprograms. This is generally cleaner, and in "background mode" is able to use natural parallelism rather than the ugly kludge of using shell backgrounding. Aside from being less ugly, this also makes termination of the "background" process directly visible, avoiding, e.g., hangs when valgrind bombs. TESTED: Ran "scons build-all check" on several platforms. Also ran valgrind-audit where valgrind was installed, though this has issues on some platforms.
* Updates MAXCHANNELS in gps.py to match gps.h.Fred Wright2017-01-191-1/+1
| | | | | | | | | | This value is only provided as a convenience, and has no internal function at all. It was never updated to reflect the two increases in gps.h. The new value would be excessive for xgps, but that no longer uses this definition. TESTED: No point.