diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-10-02 15:56:08 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-10-02 15:56:08 +0000 |
commit | a0023da1ea2b268830d981de3b3b5b2cf6058612 (patch) | |
tree | 6a3334a9b6f72643f6d60facd416d7dd17196b16 /gpsd.c | |
parent | 34574031fb921a546325b5339c917d64ae6c58f8 (diff) | |
download | gpsd-a0023da1ea2b268830d981de3b3b5b2cf6058612.tar.gz |
The new instrumentation pays off.
On NMEA devices, mode could sometimes be held across cycles when it
shouldn't have been. Fix this, simplifying how cycles are tracked in
the process. Some regression tests needed rebuilding. Code splints
clean.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2252,7 +2252,7 @@ int main(int argc, char *argv[]) channel < channels + NITEMS(channels); channel++) { if (channel->device == device) { - if ((channel->device->cycle_state & CYCLE_START)!=0) + if ((changed & CLEAR_SET)!=0) gps_clear_fix(&channel->fixbuffer); /* don't downgrade mode if holding previous fix */ if (channel->fixbuffer.mode > channel->device->gpsdata.fix.mode) @@ -2296,7 +2296,7 @@ int main(int argc, char *argv[]) * Driver returns reliable end of cycle, * report only when that is signaled. */ - if ((device->cycle_state & CYCLE_END)!=0) + if ((changed & REPORT_SET)!=0) report_fix = true; } else if (changed & (LATLON_SET | MODE_SET)) /* |