summaryrefslogtreecommitdiff
path: root/gpsprof
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-07-14 13:38:41 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-07-14 13:38:41 -0400
commit3771dba081bd1175adab6096d7b6270d3822aaa1 (patch)
treea82f63ea6c73f50abf2e7485ac5860947a328327 /gpsprof
parent0ed4411238709e8860029e6428baafe461985051 (diff)
downloadgpsd-3771dba081bd1175adab6096d7b6270d3822aaa1.tar.gz
Carry through and document the poll() -> read() change.
Diffstat (limited to 'gpsprof')
-rwxr-xr-xgpsprof8
1 files changed, 4 insertions, 4 deletions
diff --git a/gpsprof b/gpsprof
index e88936b7..8dd9e1b2 100755
--- a/gpsprof
+++ b/gpsprof
@@ -395,12 +395,12 @@ def plotframe(await, fname, speed, threshold, title):
sys.stderr.write("gpsprof: gpsd unreachable.\n")
sys.exit(1)
# Initialize
- session.poll()
+ session.read()
if session.version == None:
print >>sys.stderr, "gpsprof: requires gpsd to speak new protocol."
sys.exit(1)
session.send("?DEVICES;")
- while session.poll() != -1:
+ while session.read() != -1:
if session.data["class"] == "DEVICES":
break
if len(session.data.devices) != 1:
@@ -416,7 +416,7 @@ def plotframe(await, fname, speed, threshold, title):
# Set parameters
if speed:
session.send('?DEVICE={"path":"%s","bps:":%d}' % (path, speed))
- session.poll()
+ session.read()
if session.baudrate != speed:
sys.stderr.write("gpsprof: baud rate change failed.\n")
options = ""
@@ -429,7 +429,7 @@ def plotframe(await, fname, speed, threshold, title):
countdown = await
basetime = time.time()
while countdown > 0:
- if session.poll() == -1:
+ if session.read() == -1:
sys.stderr.write("gpsprof: gpsd has vanished.\n")
sys.exit(1)
baton.twirl()