summaryrefslogtreecommitdiff
path: root/gpsprof
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-24 05:28:25 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-24 05:28:25 +0000
commit591a1a43535e9fb760d61721960cd3a25c972f1d (patch)
tree376dfa950d9a620f48e76e865aa11a43db43d5f3 /gpsprof
parent1b4191060a037e685134c7da12040ad39be46740 (diff)
downloadgpsd-591a1a43535e9fb760d61721960cd3a25c972f1d.tar.gz
Better description of new Python API.
query() is really gone; add a resulting to-do item. Codebase splints clean, all regression tests pass.
Diffstat (limited to 'gpsprof')
-rwxr-xr-xgpsprof10
1 files changed, 6 insertions, 4 deletions
diff --git a/gpsprof b/gpsprof
index 635cb839..2f8ea382 100755
--- a/gpsprof
+++ b/gpsprof
@@ -386,6 +386,7 @@ formatters = (spaceplot, uninstrumented, rawplot, splitplot, cycle)
def plotframe(await, fname, speed, threshold, title):
"Return a string containing a GNUplot script "
+ # FIXME: Has dependency on old protocol
if fname:
for formatter in formatters:
if formatter.name == fname:
@@ -401,12 +402,13 @@ def plotframe(await, fname, speed, threshold, title):
sys.exit(1)
try:
if speed:
- session.query("b=%d\n" % speed)
+ session.send("b=%d\n" % speed)
+ session.poll()
if session.baudrate != speed:
sys.stderr.write("gpsprof: baud rate change failed.\n")
- session.query("w+bci\n")
+ session.send("w+bci\n")
if formatter not in (spaceplot, uninstrumented):
- session.query("z+\n")
+ session.send("z+\n")
#session.set_raw_hook(lambda x: sys.stderr.write(`x`+"\n"))
baton = Baton("gpsprof: looking for fix", "done")
countdown = await
@@ -429,7 +431,7 @@ def plotframe(await, fname, speed, threshold, title):
countdown -= 1
baton.end()
finally:
- session.query("w-z-\n")
+ session.send("w-z-\n")
command = plotter.plot(title, session)
del session
return command