summaryrefslogtreecommitdiff
path: root/libgps_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-27 10:42:20 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-27 10:42:20 +0000
commit4c1521989936dad0e2a391e87da33547bda11250 (patch)
tree1e4841bc2e2c1a70f552cfa532eefc2ca799bde7 /libgps_json.c
parent87b50e3f3f5c0305e6cefdc4f7a517f7d961f8b7 (diff)
downloadgpsd-4c1521989936dad0e2a391e87da33547bda11250.tar.gz
Integrate RTCM2 JSON parsing into the build.
Diffstat (limited to 'libgps_json.c')
-rw-r--r--libgps_json.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libgps_json.c b/libgps_json.c
index 79c4dcd7..e37a6eee 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -258,6 +258,13 @@ int libgps_json_unpack(const char *buf, struct gps_data_t *gpsdata)
} else if (strstr(buf, "\"class\":\"VERSION\"") != 0) {
return json_version_read(buf, gpsdata, NULL);
+ } else if (strstr(buf, "\"class\":\"RTCM2\"") != 0) {
+ status = json_rtcm2_read(buf,
+ gpsdata->dev.path, sizeof(gpsdata->dev.path),
+ &gpsdata->rtcm2, NULL);
+ if (status == 0)
+ gpsdata->set |= RTCM2_SET;
+ return status;
} else if (strstr(buf, "\"class\":\"ERROR\"") != 0) {
return json_error_read(buf, gpsdata, NULL);
} else