diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-09 23:24:38 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-09 23:24:38 -0500 |
commit | 038f7c549642d361443e133a0cbcdd89c7c3f24d (patch) | |
tree | 263e96797b6e354781149bf3f44f6353e33ef86b /gpsd.c | |
parent | e030575a5248f6ad125af9e05fa0bc63ad811618 (diff) | |
download | gpsd-038f7c549642d361443e133a0cbcdd89c7c3f24d.tar.gz |
PPS events now show in gpsmon runb through the daemon.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1674,6 +1674,17 @@ static void ship_pps_drift_message(struct gps_device_t *session, /* on PPS interrupt, ship a drift message to all clients */ { #ifdef SOCKET_EXPORT_ENABLE +#ifdef PPS_ENABLE +#define PPSBAR "#----------------------------------- PPS -----------------------------------#\n" + struct subscriber_t *sub; + + for (sub = subscribers; sub < subscribers + MAXSUBSCRIBERS; sub++) { + if (sub->active != 0 && subscribed(sub, session) && sub->policy.ppsbar){ + (void)throttled_write(sub, PPSBAR, strlen(PPSBAR)); + } + } +#endif /* PPS_ENABLE */ +#undef PPSBAR /*@-type@*//* splint is confused about struct timespec */ /* * Yes, real_nsec is constant 0 because our "real time" is top of GPS @@ -1684,6 +1695,7 @@ static void ship_pps_drift_message(struct gps_device_t *session, td->real.tv_sec, td->real.tv_nsec, td->clock.tv_sec, td->clock.tv_nsec); /*@+type@*/ + return; #endif /* SOCKET_EXPORT_ENABLE */ } #endif /* PPS_ENABLE */ |