diff options
-rw-r--r-- | driver_italk.c | 3 | ||||
-rw-r--r-- | driver_sirf.c | 3 | ||||
-rw-r--r-- | driver_ubx.c | 7 | ||||
-rw-r--r-- | gpsd.h-tail | 6 | ||||
-rw-r--r-- | subframe.c | 7 |
5 files changed, 12 insertions, 14 deletions
diff --git a/driver_italk.c b/driver_italk.c index 4332873f..4bd680d1 100644 --- a/driver_italk.c +++ b/driver_italk.c @@ -243,8 +243,7 @@ static gps_mask_t decode_itk_subframe(struct gps_device_t *session, for (i = 0; i < 10; i++) words[i] = (uint32_t)(getleu32(buf, 7 + 14 + 4 * i) >> 6) & 0xffffff; - gpsd_interpret_subframe(session, prn, words); - return SUBFRAME_IS; + return gpsd_interpret_subframe(session, prn, words); } static gps_mask_t decode_itk_pseudo(struct gps_device_t *session, diff --git a/driver_sirf.c b/driver_sirf.c index 96aa7518..a8ffe931 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -450,7 +450,6 @@ static gps_mask_t sirf_msg_navdata(struct gps_device_t *session, words[i] = (uint32_t)getbeu32(buf, 4 * i + 3); } - (void)gpsd_interpret_subframe_raw(session, svid, words); #ifdef ALLOW_RECONFIGURE if ( session->gpsdata.dev.baudrate < 38400) { @@ -461,7 +460,7 @@ static gps_mask_t sirf_msg_navdata(struct gps_device_t *session, } #endif /* ALLOW_RECONFIGURE */ - return SUBFRAME_IS; + return gpsd_interpret_subframe_raw(session, svid, words); } #define SIRF_CHANNELS 12 /* max channels allowed in SiRF format */ diff --git a/driver_ubx.c b/driver_ubx.c index 22ae91ed..1656fe3c 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -273,7 +273,7 @@ static void ubx_msg_sbas(struct gps_device_t *session, unsigned char *buf) /* * Raw Subframes */ -static void ubx_msg_sfrb(struct gps_device_t *session, unsigned char *buf) +static gps_mask_t ubx_msg_sfrb(struct gps_device_t *session, unsigned char *buf) { unsigned int i, chan, svid; uint32_t words[10]; @@ -287,7 +287,7 @@ static void ubx_msg_sfrb(struct gps_device_t *session, unsigned char *buf) words[i] = (uint32_t)getleu32(buf, 4 * i + 2) & 0xffffff; } - gpsd_interpret_subframe(session, svid, words); + return gpsd_interpret_subframe(session, svid, words); } static void ubx_msg_inf(unsigned char *buf, size_t data_len) @@ -398,8 +398,7 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf, gpsd_report(LOG_IO, "UBX_RXM_RAW\n"); break; case UBX_RXM_SFRB: - ubx_msg_sfrb(session, &buf[6]); - mask = SUBFRAME_IS; + mask = ubx_msg_sfrb(session, &buf[6]); break; case UBX_RXM_SVSI: gpsd_report(LOG_PROG, "UBX_RXM_SVSI\n"); diff --git a/gpsd.h-tail b/gpsd.h-tail index 3017e6be..f35b1693 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -149,8 +149,8 @@ extern unsigned int isgps_parity(isgps30bits_t); extern void isgps_output_magnavox(const isgps30bits_t *, unsigned int, FILE *); extern enum isgpsstat_t rtcm2_decode(struct gps_packet_t *, unsigned int); -extern void subframe_json_dump(const struct subframe_t *, /*@out@*/ char buf[], - size_t); +extern void subframe_json_dump(const struct subframe_t *, /*@out@*/ char buf[], + size_t); extern void rtcm2_sager_dump(const struct rtcm2_t *, /*@out@*/char[], size_t); extern void rtcm2_json_dump(const struct rtcm2_t *, /*@out@*/char[], size_t); extern int rtcm2_undump(/*@out@*/struct rtcm2_t *, char *); @@ -561,7 +561,7 @@ extern void gpsd_assert_sync(struct gps_device_t *); extern void gpsd_close(struct gps_device_t *); extern void gpsd_zero_satellites(/*@out@*/struct gps_data_t *sp)/*@modifies sp@*/; -extern void gpsd_interpret_subframe(struct gps_device_t *, unsigned int, uint32_t[]); +extern gps_mask_t gpsd_interpret_subframe(struct gps_device_t *, unsigned int, uint32_t[]); extern int gpsd_interpret_subframe_raw(struct gps_device_t *, unsigned int, uint32_t[]); extern int gpsd_hexdump_level; extern /*@ observer @*/ char *gpsd_hexdump(/*@null@*/const void *, size_t); @@ -132,7 +132,7 @@ static void subframe_almanac(unsigned int tSVID, uint32_t words[], almp->d_af1); } -void gpsd_interpret_subframe(struct gps_device_t *session, +gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session, unsigned int tSVID, uint32_t words[]) { /* @@ -169,7 +169,7 @@ void gpsd_interpret_subframe(struct gps_device_t *session, gpsd_report(LOG_WARN, "50B: gpsd_interpret_subframe bad preamble: 0x%x header 0x%x\n", preamble, words[0]); - return; + return 0; } subp->integrity = ((words[0] >> 1) & 0x01); /* The subframe ID is in the Hand Over Word (page 80) */ @@ -816,9 +816,10 @@ void gpsd_interpret_subframe(struct gps_device_t *session, break; default: /* unknown/illegal subframe */ + return 0; break; } - return; + return SUBFRAME_IS; } /*@ +usedef @*/ |