diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-04-09 19:17:16 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-04-09 19:17:16 -0400 |
commit | d6c1a9c97365e69341b6317648d755b523a4b67c (patch) | |
tree | 566877db9f5cd729be36be31b44fd0ea0247a1bf /driver_zodiac.c | |
parent | 542fbcdc813478e817c47a7fc11e4eb5774c2d83 (diff) | |
download | gpsd-d6c1a9c97365e69341b6317648d755b523a4b67c.tar.gz |
Make the client library and daemon use different sets of state-flag masks.
Large patch, no actual executable code changes except in three debug dumpers.
Breaks up the *_SET status macros so the client side continues to use them,
but the daemon uses a similarly-named set with an _IS suffix.
This frees up two mask bits in both sets - the client side no longer needs
to have REPORT_SET and CLEAR_SET bits, and the daemon side no longer needs
to have VERSION_SET and POLICY_SET.
The only actual code change is that the maskdump.c module, generated by
maskaudit.py, splits in half - one child now dumps client-side flags, the
other daemon-side flags. One other function call in a debug dumper in
libgps_core.c changes.
All regression tests pass.
Diffstat (limited to 'driver_zodiac.c')
-rw-r--r-- | driver_zodiac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/driver_zodiac.c b/driver_zodiac.c index b9415708..1b41bd5f 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -222,7 +222,7 @@ static gps_mask_t handle1000(struct gps_device_t *session) gpsd_report(LOG_INF, "Separation: %f\n", getzword(33) * 1e-2); #endif - mask = TIME_SET|LATLON_SET|ALTITUDE_SET|CLIMB_SET|SPEED_SET|TRACK_SET|STATUS_SET|MODE_SET; + mask = TIME_IS|LATLON_IS|ALTITUDE_IS|CLIMB_IS|SPEED_IS|TRACK_IS|STATUS_IS|MODE_IS; gpsd_report(LOG_DATA, "1000: time=%.2f lat=%.2f lon=%.2f alt=%.2f track=%.2f speed=%.2f climb=%.2f mode=%d status=%d mask=%s\n", session->newdata.time, @@ -281,7 +281,7 @@ static gps_mask_t handle1002(struct gps_device_t *session) "1002: visible=%d used=%d mask={SATELLITE|USED}\n", session->gpsdata.satellites_visible, session->gpsdata.satellites_used); - return SATELLITE_SET | USED_SET; + return SATELLITE_IS | USED_IS; } static gps_mask_t handle1003(struct gps_device_t *session) @@ -332,7 +332,7 @@ static gps_mask_t handle1003(struct gps_device_t *session) session->gpsdata.dop.vdop, session->gpsdata.dop.pdop, session->gpsdata.dop.tdop); - return SATELLITE_SET | DOP_SET; + return SATELLITE_IS | DOP_IS; } static void handle1005(struct gps_device_t *session UNUSED) @@ -381,7 +381,7 @@ static gps_mask_t handle1011(struct gps_device_t *session) session->packet.outbuffer, 19, 28); /* software version field */ gpsd_report(LOG_DATA, "1011: subtype=%s mask={DEVICEID}\n", session->subtype); - return DEVICEID_SET; + return DEVICEID_IS; } @@ -447,7 +447,7 @@ static gps_mask_t zodiac_analyze(struct gps_device_t *session) switch (id) { case 1000: - return handle1000(session) | (CLEAR_SET | REPORT_SET); + return handle1000(session) | (CLEAR_IS | REPORT_IS); case 1002: return handle1002(session); case 1003: |