summaryrefslogtreecommitdiff
path: root/driver_oncore.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-27 10:57:51 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-27 10:57:51 -0400
commitd004b6a55f36506cbc5977d817bd4ce3c3903c6f (patch)
treee8d5af24676888fd628887721ce6e3e0b6c98f5d /driver_oncore.c
parent81670f70953c4f99730c51bd17fb0c8a65972fe1 (diff)
downloadgpsd-d004b6a55f36506cbc5977d817bd4ce3c3903c6f.tar.gz
Re-identify most *_IS flags with corresponding *_SET flags.
Required so clients looking at flag masks in data exported via the shared-memory interface will see the right thing. These were separated originally in order to avoid pushing the reqyuired width of the gpsdata.set flag mask over 32 bits. It became 64 bits in the Version 5 API change, so that constraint went away. All regression tests pass.
Diffstat (limited to 'driver_oncore.c')
-rw-r--r--driver_oncore.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/driver_oncore.c b/driver_oncore.c
index 88bc8f39..a90665cf 100644
--- a/driver_oncore.c
+++ b/driver_oncore.c
@@ -77,7 +77,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
if (data_len != 76)
return 0;
- mask = ONLINE_IS;
+ mask = ONLINE_SET;
gpsd_report(LOG_IO, "oncore NAVSOL - navigation data\n");
flags = (unsigned char)getub(buf, 72);
@@ -94,7 +94,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
session->newdata.mode = MODE_NO_FIX;
session->gpsdata.status = STATUS_NO_FIX;
}
- mask |= MODE_IS;
+ mask |= MODE_SET;
/*@ +predboolothers @*/
/* Unless we have seen non-zero utc offset data, the time is GPS time
@@ -112,7 +112,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
/*@ -unrecog */
session->newdata.time = (timestamp_t)timegm(&unpacked_date) + nsec * 1e-9;
/*@ +unrecog */
- mask |= TIME_IS;
+ mask |= TIME_SET;
gpsd_report(LOG_IO,
"oncore NAVSOL - time: %04d-%02d-%02d %02d:%02d:%02d.%09d\n",
unpacked_date.tm_year + 1900, unpacked_date.tm_mon + 1,
@@ -143,7 +143,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
session->newdata.speed = speed;
session->newdata.track = track;
- mask |= LATLON_IS | ALTITUDE_IS | SPEED_IS | TRACK_IS;
+ mask |= LATLON_SET | ALTITUDE_SET | SPEED_SET | TRACK_SET;
gpsd_zero_satellites(&session->gpsdata);
/* Merge the satellite information from the Bb message. */
@@ -181,7 +181,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
if (status & 0x02)
mask |= PPSTIME_IS;
/*
- * The PPSTIME_IS mask bit exists distinctly from TIME_IS exactly
+ * The PPSTIME_IS mask bit exists distinctly from TIME_SET exactly
* so an OnCore running in time-service mode (and other GPS clocks)
* can signal that it's returning time even though no position fixes
* have been available.
@@ -202,7 +202,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
session->gpsdata.satellites_used = (int)nsv;
session->gpsdata.satellites_visible = (int)st;
- mask |= SATELLITE_IS | USED_IS;
+ mask |= SATELLITE_SET | USED_IS;
/* Some messages can only be polled. As they are not so
* important, would be enough to poll e.g. one message per cycle.
@@ -220,7 +220,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf,
session->newdata.speed, session->newdata.track,
session->newdata.mode, session->gpsdata.status,
session->gpsdata.satellites_used,
- session->gpsdata.satellites_visible, gpsd_maskdump(mask));
+ session->gpsdata.satellites_visible, gps_maskdump(mask));
return mask;
}
@@ -310,7 +310,7 @@ oncore_msg_svinfo(struct gps_device_t *session, unsigned char *buf,
}
gpsd_report(LOG_DATA, "SVINFO: mask={SATELLITE}\n");
- return SATELLITE_IS;
+ return SATELLITE_SET;
}
/**