diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | gps.h | 1 | ||||
-rw-r--r-- | gpsd.c | 11 | ||||
-rw-r--r-- | gpsd_json.c | 5 | ||||
-rw-r--r-- | gpsd_json.xml | 10 | ||||
-rw-r--r-- | libgps_core.c | 3 | ||||
-rw-r--r-- | shared_json.c | 1 | ||||
-rw-r--r-- | test/clientlib/multipacket.log.chk | 2 |
9 files changed, 13 insertions, 26 deletions
@@ -2,7 +2,9 @@ Repository head: Better protection agains false matches of Inland AIS messages; this - required a libgps version bump to 22. + required a libgps version bump to 22. PPS feature is no longer marked + experimental/unstable and the separate "pps" policy flag is gone; PPS + is now always emitten when watching JSON. * Sat 23 Aug 2014 Eric S. Raymond <esr@snark.thyrsus.com> - 3.11 A bug that prevented track interpolation has been fixed. @@ -101,7 +101,7 @@ We caw now *really* measure latency from GPS top of second when it has 1PPS. Add this capability to gpsprof and revise the "Where's the Latency?" white paper. -*** Low-pwer autoconfiguration in the uBlox driver *** +*** Low-power autoconfiguration in the uBlox driver *** Anthony Stirk <upuaut@gmail.com> writes on Wed May 21 06:09:00 2014: @@ -1886,7 +1886,6 @@ struct policy_t { bool scaled; /* requesting report scaling? */ bool timing; /* requesting timing info */ bool split24; /* requesting split AIS Type 24s */ - bool pps; /* requesting PPS in NMEA/raw modes */ int loglevel; /* requested log level of messages */ char devpath[GPS_PATH_MAX]; /* specific device to watch */ char remote[GPS_PATH_MAX]; /* ...if this was passthrough */ @@ -673,7 +673,6 @@ static ssize_t throttled_write(struct subscriber_t *sub, char *buf, } static void notify_watchers(struct gps_device_t *device, - bool onjson, bool onpps, const char *sentence, ...) /* notify all JSON-watching clients of a given device about an event */ { @@ -687,7 +686,7 @@ static void notify_watchers(struct gps_device_t *device, for (sub = subscribers; sub < subscribers + MAXSUBSCRIBERS; sub++) if (sub->active != 0 && subscribed(sub, device)) { - if ((onjson && sub->policy.json) || (onpps && sub->policy.pps)) + if (sub->policy.json) (void)throttled_write(sub, buf, strlen(buf)); } } @@ -697,7 +696,7 @@ static void deactivate_device(struct gps_device_t *device) /* deactivate device, but leave it in the pool (do not free it) */ { #ifdef SOCKET_EXPORT_ENABLE - notify_watchers(device, true, false, + notify_watchers(device, "{\"class\":\"DEVICE\",\"path\":\"%s\",\"activated\":0}\r\n", device->gpsdata.dev.path); #endif /* SOCKET_EXPORT_ENABLE */ @@ -786,7 +785,7 @@ bool gpsd_add_device(const char *device_name, bool flag_nowait) ret = open_device(devp); } #ifdef SOCKET_EXPORT_ENABLE - notify_watchers(devp, true, false, + notify_watchers(devp, "{\"class\":\"DEVICE\",\"path\":\"%s\",\"activated\":%lf}\r\n", devp->gpsdata.dev.path, timestamp()); #endif /* SOCKET_EXPORT_ENABLE */ @@ -1508,7 +1507,7 @@ static void all_reports(struct gps_device_t *device, gps_mask_t changed) { char id2[GPS_JSON_RESPONSE_MAX]; json_device_dump(device, id2, sizeof(id2)); - notify_watchers(device, true, false, id2); + notify_watchers(device, id2); } } #endif /* SOCKET_EXPORT_ENABLE */ @@ -1701,7 +1700,7 @@ static void ship_pps_drift_message(struct gps_device_t *session, { #ifdef SOCKET_EXPORT_ENABLE /*@-type@*//* splint is confused about struct timespec */ - notify_watchers(session, true, true, + notify_watchers(session, "{\"class\":\"PPS\",\"device\":\"%s\",\"real_sec\":%ld, \"real_nsec\":%ld,\"clock_sec\":%ld,\"clock_nsec\":%ld}\r\n", session->gpsdata.dev.path, td->real.tv_sec, td->real.tv_nsec, diff --git a/gpsd_json.c b/gpsd_json.c index 64c13e0a..582f946d 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -434,15 +434,14 @@ void json_watch_dump(const struct policy_t *ccp, { /*@-compdef@*/ (void)snprintf(reply, replylen, - "{\"class\":\"WATCH\",\"enable\":%s,\"json\":%s,\"nmea\":%s,\"raw\":%d,\"scaled\":%s,\"timing\":%s,\"split24\":%s,\"pps\":%s,", + "{\"class\":\"WATCH\",\"enable\":%s,\"json\":%s,\"nmea\":%s,\"raw\":%d,\"scaled\":%s,\"timing\":%s,\"split24\":%s,", ccp->watcher ? "true" : "false", ccp->json ? "true" : "false", ccp->nmea ? "true" : "false", ccp->raw, ccp->scaled ? "true" : "false", ccp->timing ? "true" : "false", - ccp->split24 ? "true" : "false", - ccp->pps ? "true" : "false"); + ccp->split24 ? "true" : "false"); if (ccp->devpath[0] != '\0') (void)snprintf(reply + strlen(reply), replylen - strlen(reply), "\"device\":\"%s\",", ccp->devpath); diff --git a/gpsd_json.xml b/gpsd_json.xml index 3c809e59..7772ab69 100644 --- a/gpsd_json.xml +++ b/gpsd_json.xml @@ -1011,16 +1011,6 @@ object.</para> false. Applies only to AIS reports.</entry> </row> <row> - <entry>pps</entry> - <entry>No</entry> - <entry>boolean</entry> - <entry>If true, emit a PPS JSON message when the device issues - 1PPS. Intended to be used with the "nmea" and "raw" modes. - Default is false. <emphasis role="bold">Note: this is an - unstable experimental feature which may change or be removed - without notice.</emphasis></entry> -</row> -<row> <entry>device</entry> <entry>No</entry> <entry>string</entry> diff --git a/libgps_core.c b/libgps_core.c index bbaf8957..567cf254 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -321,14 +321,13 @@ void libgps_dump_state(struct gps_data_t *collect) collect->version.proto_minor); if (collect->set & POLICY_SET) (void)fprintf(debugfp, - "POLICY: watcher=%s nmea=%s raw=%d scaled=%s timing=%s, split24=%s pps=%s, devpath=%s\n", + "POLICY: watcher=%s nmea=%s raw=%d scaled=%s timing=%s, split24=%s devpath=%s\n", collect->policy.watcher ? "true" : "false", collect->policy.nmea ? "true" : "false", collect->policy.raw, collect->policy.scaled ? "true" : "false", collect->policy.timing ? "true" : "false", collect->policy.split24 ? "true" : "false", - collect->policy.pps ? "true" : "false", collect->policy.devpath); if (collect->set & SATELLITE_SET) { int i; diff --git a/shared_json.c b/shared_json.c index 4c6f14ed..7c87c3e6 100644 --- a/shared_json.c +++ b/shared_json.c @@ -97,7 +97,6 @@ int json_watch_read(const char *buf, {"scaled", t_boolean, .addr.boolean = &ccp->scaled}, {"timing", t_boolean, .addr.boolean = &ccp->timing}, {"split24", t_boolean, .addr.boolean = &ccp->split24}, - {"pps", t_boolean, .addr.boolean = &ccp->pps}, {"device", t_string, .addr.string = ccp->devpath, .len = sizeof(ccp->devpath)}, {"remote", t_string, .addr.string = ccp->remote, diff --git a/test/clientlib/multipacket.log.chk b/test/clientlib/multipacket.log.chk index dbcd18c8..9c57fe6d 100644 --- a/test/clientlib/multipacket.log.chk +++ b/test/clientlib/multipacket.log.chk @@ -1,4 +1,4 @@ flags: (0x20100000) {DEVICELIST|POLICY} -POLICY: watcher=true nmea=false raw=0 scaled=false timing=false, split24=false pps=false, devpath= +POLICY: watcher=true nmea=false raw=0 scaled=false timing=false, split24=false devpath= DEVICELIST:1 devices: 1: path='/dev/ttyS0' driver='SiRF binary' |