summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-21 00:28:13 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-21 00:28:13 -0400
commitefdcc5da401feb3dbf5932932e60ff47a5b560e9 (patch)
treeb99964a2ad2cdbf71a19ff8a5ec4d82df4d3f4e6
parenta6f1d32121b7ce8b4cb9485f238eb62f23b75c7e (diff)
downloadgpsd-efdcc5da401feb3dbf5932932e60ff47a5b560e9.tar.gz
Make the 'uninstrumented' plot work again.
-rw-r--r--gps/misc.py2
-rw-r--r--gpsd_json.c2
-rwxr-xr-xgpsprof4
3 files changed, 4 insertions, 4 deletions
diff --git a/gps/misc.py b/gps/misc.py
index d635e590..0782e7d6 100644
--- a/gps/misc.py
+++ b/gps/misc.py
@@ -84,7 +84,7 @@ def isotime(s):
msec = s - date
date = time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime(s))
return date + "." + `msec`[3:]
- elif type(s) == type(""):
+ elif type(s) == type("") or type(s) == type(u""):
if s[-1] == "Z":
s = s[:-1]
if "." in s:
diff --git a/gpsd_json.c b/gpsd_json.c
index bb5a6201..62dae913 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -119,7 +119,7 @@ void json_tpv_dump(const struct gps_data_t *gpsdata,
{
char tbuf[JSON_DATE_MAX+1];
#ifdef TIMING_ENABLE
- timestamp_t xmit_time = realtimestamp();
+ timestamp_t xmit_time = timestamp();
#endif /* TIMING_ENABLE */
assert(replylen > 2);
diff --git a/gpsprof b/gpsprof
index e688cac1..54b27f13 100755
--- a/gpsprof
+++ b/gpsprof
@@ -156,7 +156,7 @@ class uninstrumented:
self.stats = []
def gather(self, session):
if session.fix.time:
- seconds = time.time() - session.fix.time
+ seconds = time.time() - gps.misc.isotime(session.data.time)
self.stats.append(seconds)
return True
else:
@@ -235,7 +235,7 @@ def plotframe(await, fname, speed, threshold, title):
sys.exit(1)
baton.twirl()
if session.data["class"] == "WATCH":
- if "timing" in options and not session.data.get("timing"):
+ if "timing" in options and not session.data.get("xmit_time"):
sys.stderr.write("gpsprof: timing is not enabled.\n")
sys.exit(1)
# We can get some funky artifacts at start of session