diff options
Diffstat (limited to 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index 7cde8745..59760808 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -308,8 +308,9 @@ void json_watch_dump(const struct policy_t *ccp, { /*@-compdef@*/ (void)snprintf(reply+strlen(reply), replylen-strlen(reply), - "{\"class\":\"WATCH\",\"enable\":%s,\"raw\":%d,\"scaled\":%s}\r\n", + "{\"class\":\"WATCH\",\"enable\":%s,\"nmea\":%s,\"raw\":%d,\"scaled\":%s}\r\n", ccp->watcher ? "true" : "false", + ccp->nmea ? "true" : "false", ccp->raw, ccp->scaled ? "true" : "false"); /*@+compdef@*/ @@ -1247,6 +1248,8 @@ int json_watch_read(const char *buf, .dflt.boolean = true}, {"raw", integer, .addr.integer = &ccp->raw, .nodefault = true}, + {"nmea", boolean, .addr.boolean = &ccp->nmea, + .nodefault = true}, {"scaled", boolean, .addr.boolean = &ccp->scaled}, {NULL}, }; |