summaryrefslogtreecommitdiff
path: root/gps
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Changes fake.py stream type to 'bytes'.Fred Wright2016-12-252-5/+15
| | | | | | | | | | | | | | | | | | | Given that the data returned bye fake.py may include binary data, 'bytes' is a more appropriate type. Unlike the client API, where it's easy to provide both return types, it would be less convenient to do that here, so 'bytes' is preferred as the one choice (and is consistent with network sockets). When sending such data to stdout (or stderr), the straightforward method is to write to sys.stdXXX.buffer rather than sys.stdXXX. That doesn't exist in Python 2, but a helper function is now provided to get the appropriate 'bytes' stream for stdXXX. Since no previous *release* of GPSD is compatible with Python 3, changing this now doesn't break anything based on released code. TESTED: Ran "scons check" on OSX with all supported Python versions.
* Adds bytes-typed alternative response to Python client.Fred Wright2016-12-241-5/+12
| | | | | | | | | | | | | | | | | | | | | In Python 2, 'bytes' and 'str' are synonyms, but in Python 3 they are not. Since the client may return binary data in some cases, 'bytes' is a more appropriate data type. Rather than requiring double conversions in this case (the socket returns 'bytes'), this adds an alternative response item which is typed as 'bytes'. Although the accessor method 'data()' has always existed, it's shadowed by a name collision in some cases, resulting in the requirement that the caller access the 'response' item directly (as noted in the documentation). Thus, it's not possible to avoid the conversion to 'str' in the cases where it isn't actually used. This change doesn't bother to add an accessor method for 'bresponse', for consistency with the way the API is normally used, though that should be fixed if this aspect of the API is ever cleaned up. TESTED: Ran "scons check" on OSX with all supported versions of Python.
* Decode "device", some format cleanup.Gary E. Miller2016-09-131-19/+23
|
* Add missing tdop, alpha sort attributes.Gary E. Miller2016-09-131-11/+12
|
* gpsddata.fix.time was toggling from ISO time string to UNIX secondsGary E. Miller2016-09-121-5/+3
| | | | JSON TPV always sends ISO 8601 strings, as documented in gpsd_json(5)
* Retab for Python 3, clean up some formatting.Gary E. Miller2016-09-121-50/+53
|
* Whoops, MeterOffset() really was used, restore it.Gary E. Miller2016-07-271-0/+12
| | | | | Also, do a sign change by negation, not multiplication! Much better thing to do in double math.
* Rip out guts of EarthDistance() replace with Vincenty's FormulaGary E. Miller2016-07-261-35/+69
| | | | | | | The old EarthDistance was aweful. Vincenty's is supposed accurate to 1 mm! In some extreme cases it fails to converge, so fall back to EarthDistanceSmall() in that case.