summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index 8529d804..bedf7c0d 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1286,6 +1286,19 @@ static void json_report(struct subscriber_t *sub,
buf, sizeof(buf));
(void)throttled_write(sub, buf, strlen(buf));
}
+ /*
+ * Subframe reporting works a bit differently because
+ * it has to be enabled at device level in order for
+ * *any* subscriber to see it, but *not all* subscribers
+ * necessarily want it. So we leave it up to the device
+ * drivers to decide whether to turn subframe reporting on,
+ * and gate the reports here.
+ */
+ if (sub->policy.subframe && (changed & SUBFRAME_IS) != 0) {
+ subframe_json_dump(&device->gpsdata.subframe,
+ buf, sizeof(buf));
+ (void)throttled_write(sub, buf, strlen(buf));
+ }
#ifdef COMPASS_ENABLE
if ((changed & ATT_IS) != 0) {
json_att_dump(&device->gpsdata,