summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-10-02 15:56:08 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-10-02 15:56:08 +0000
commita0023da1ea2b268830d981de3b3b5b2cf6058612 (patch)
tree6a3334a9b6f72643f6d60facd416d7dd17196b16 /gpsd.c
parent34574031fb921a546325b5339c917d64ae6c58f8 (diff)
downloadgpsd-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsd.c b/gpsd.c
index da148b1b..abeedcca 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -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))
/*