summaryrefslogtreecommitdiff
path: root/driver_superstar2.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-18 21:53:26 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-18 21:53:26 +0000
commitcb7e7527b1c5aff41a47dd08f842c0467120a411 (patch)
tree2d83d6f881cc9ef94b486fdc35d35ff2f635b2cf /driver_superstar2.c
parentc01cbf2c9811fae27852a799368dcc8922364199 (diff)
downloadgpsd-cb7e7527b1c5aff41a47dd08f842c0467120a411.tar.gz
Move some struct gpsdata_t members around to get better space economy.
Change the way device lists are represented so they can carry attributes from the new protocol. No more variable sizes by configure option, all that stuff gets swallowed up in the union member now.
Diffstat (limited to 'driver_superstar2.c')
-rw-r--r--driver_superstar2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/driver_superstar2.c b/driver_superstar2.c
index 45e13e09..d4a5a9b0 100644
--- a/driver_superstar2.c
+++ b/driver_superstar2.c
@@ -346,15 +346,15 @@ superstar2_msg_measurement(struct gps_device_t *session, unsigned char *buf, siz
n = (int)getub(buf, 6); /* number of measurements */
t = getled(buf, 7); /* measurement time */
for(i = 0; i < n; i++){
- session->gpsdata.mtime[i] = t;
+ session->gpsdata.raw.mtime[i] = t;
session->gpsdata.PRN[i] = getub(buf, 11*i + 15) & 0x1f;
session->gpsdata.ss[i] = getub(buf, 11*i * 15 +1 )/4.0;
- session->gpsdata.codephase[i] = (double)getleul(buf, 11*i * 15 + 2);
+ session->gpsdata.raw.codephase[i] = (double)getleul(buf, 11*i * 15 + 2);
ul = getleul(buf, 11*i * 15 + 6);
- session->gpsdata.satstat[i] = ul & 0x03L;
- session->gpsdata.carrierphase[i] = (ul >> 2) & 0x03ffL;
- session->gpsdata.pseudorange[i] = (ul >> 12);
+ session->gpsdata.raw.satstat[i] = ul & 0x03L;
+ session->gpsdata.raw.carrierphase[i] = (ul >> 2) & 0x03ffL;
+ session->gpsdata.raw.pseudorange[i] = (ul >> 12);
}
mask |= RAW_SET | ONLINE_SET;