summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-04-06 18:09:58 -0700
committerGary E. Miller <gem@rellim.com>2016-04-06 18:09:58 -0700
commitf330da9a2989f43155b0a95a5355b70cda38f1b5 (patch)
tree4a47f4ba8579b85028f09b7d913be0ef517ddf01 /gpsd_json.c
parent75d069ef30094daa6a5bd97350cda4fbb09d4686 (diff)
downloadgpsd-f330da9a2989f43155b0a95a5355b70cda38f1b5.tar.gz
Add "status" to TPV for DGPS notification
Also update the affected regression files. gpsd had been throwing away the DGPS status.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 33f8646a..7d7e9113 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -131,6 +131,8 @@ void json_tpv_dump(const struct gps_device_t *session,
(void)strlcpy(reply, "{\"class\":\"TPV\",", replylen);
if (gpsdata->dev.path[0] != '\0')
str_appendf(reply, replylen, "\"device\":\"%s\",", gpsdata->dev.path);
+ if (gpsdata->status == STATUS_DGPS_FIX)
+ str_appendf(reply, replylen, "\"status\":2,");
str_appendf(reply, replylen, "\"mode\":%d,", gpsdata->fix.mode);
if (isnan(gpsdata->fix.time) == 0) {
char tbuf[JSON_DATE_MAX+1];