summaryrefslogtreecommitdiff
path: root/libgps_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 /libgps_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 'libgps_json.c')
-rw-r--r--libgps_json.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgps_json.c b/libgps_json.c
index 1d751682..a806c4c4 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -64,6 +64,8 @@ static int json_tpv_read(const char *buf, struct gps_data_t *gpsdata,
.dflt.real = NAN},
{"mode", t_integer, .addr.integer = &gpsdata->fix.mode,
.dflt.integer = MODE_NOT_SEEN},
+ {"status", t_integer, .addr.integer = &gpsdata->status,
+ .dflt.integer = STATUS_FIX},
{NULL},
/* *INDENT-ON* */
};
@@ -440,7 +442,6 @@ int libgps_json_unpack(const char *buf,
return -1;
if (str_starts_with(classtag, "\"class\":\"TPV\"")) {
status = json_tpv_read(buf, gpsdata, end);
- gpsdata->status = STATUS_FIX;
gpsdata->set = STATUS_SET;
if (isnan(gpsdata->fix.time) == 0)
gpsdata->set |= TIME_SET;