diff options
author | Gary E. Miller <gem@rellim.com> | 2018-11-19 15:12:06 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-11-19 15:12:06 -0800 |
commit | 6dc590fe87be3f45720ebd821c697127a594493a (patch) | |
tree | 804b296350423a14eb56db6f9e5294a3e6f65e46 | |
parent | 2e4767da3c67b4b34f00b76a151d7669a2590a80 (diff) | |
download | gpsd-6dc590fe87be3f45720ebd821c697127a594493a.tar.gz |
libgps_json: Add decode for leapseconds. Where to put it?
No place to put leapseconds in gps_data_t?
-rw-r--r-- | libgps_json.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgps_json.c b/libgps_json.c index cdc15740..080c39c9 100644 --- a/libgps_json.c +++ b/libgps_json.c @@ -35,6 +35,8 @@ PERMISSIONS static int json_tpv_read(const char *buf, struct gps_data_t *gpsdata, const char **endptr) { + int leapseconds; + const struct json_attr_t json_attrs_1[] = { /* *INDENT-OFF* */ {"class", t_check, .dflt.check = "TPV"}, @@ -44,6 +46,7 @@ static int json_tpv_read(const char *buf, struct gps_data_t *gpsdata, .dflt.real = NAN}, {"time", t_real, .addr.real = &gpsdata->fix.time, .dflt.real = NAN}, + {"leapseconds", t_integer, .addr.integer = &leapseconds}, {"ept", t_real, .addr.real = &gpsdata->fix.ept, .dflt.real = NAN}, {"lon", t_real, .addr.real = &gpsdata->fix.longitude, |