diff options
author | Gary E. Miller <gem@rellim.com> | 2011-01-02 14:17:19 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2011-01-02 14:17:19 -0800 |
commit | af95103cc89dc6a8ae1eff45e1c271e81f526223 (patch) | |
tree | 1afab44d08b4e66697e4047d1ef10e8b9ba973c0 /driver_sirf.c | |
parent | 48219acd5c63c674825c7920463b5999eaa4e3d2 (diff) | |
download | gpsd-af95103cc89dc6a8ae1eff45e1c271e81f526223.tar.gz |
Even if ALLOW_RECONFIGURE is not set still report SiRF firmware version.
Diffstat (limited to 'driver_sirf.c')
-rw-r--r-- | driver_sirf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/driver_sirf.c b/driver_sirf.c index b3425ff5..6e834e7c 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -133,9 +133,9 @@ static gps_mask_t sirf_msg_ppstime(struct gps_device_t *, unsigned char *, size_t); static gps_mask_t sirf_msg_svinfo(struct gps_device_t *, unsigned char *, size_t); -#ifdef ALLOW_RECONFIGURE static gps_mask_t sirf_msg_swversion(struct gps_device_t *, unsigned char *, size_t); +#ifdef ALLOW_RECONFIGURE static gps_mask_t sirf_msg_sysparam(struct gps_device_t *, unsigned char *, size_t); #endif /* ALLOW_RECONFIGURE */ @@ -390,7 +390,6 @@ static gps_mask_t sirf_msg_nlmd(struct gps_device_t *session UNUSED, return 0; } -#ifdef ALLOW_RECONFIGURE static gps_mask_t sirf_msg_swversion(struct gps_device_t *session, unsigned char *buf, size_t len) { @@ -408,11 +407,13 @@ static gps_mask_t sirf_msg_swversion(struct gps_device_t *session, sirfbin_mode(session, 0); } else if (fv < 232) { session->driver.sirf.driverstate |= SIRF_EQ_231; +#ifdef ALLOW_RECONFIGURE } else { gpsd_report(LOG_PROG, "SiRF: Enabling PPS message...\n"); (void)sirf_write(session->gpsdata.gps_fd, enablemid52); session->driver.sirf.driverstate |= SIRF_GE_232; session->context->valid |= LEAP_SECOND_VALID; +#endif /* ALLOW_RECONFIGURE */ } if (strstr((char *)(buf + 1), "ES")) gpsd_report(LOG_INF, "SiRF: Firmware has XTrac capability\n"); @@ -421,6 +422,7 @@ static gps_mask_t sirf_msg_swversion(struct gps_device_t *session, #ifdef NTPSHM_ENABLE session->driver.sirf.time_seen = 0; #endif /* NTPSHM_ENABLE */ +#ifdef ALLOW_RECONFIGURE if (session->gpsdata.dev.baudrate >= 38400) { /* some USB are also too slow, no way to tell which ones */ gpsd_report(LOG_PROG, "SiRF: Enabling subframe transmission...\n"); @@ -428,11 +430,11 @@ static gps_mask_t sirf_msg_swversion(struct gps_device_t *session, } else { gpsd_report(LOG_WARN, "SiRF: link too slow, disabling subframes.\n"); } +#endif /* ALLOW_RECONFIGURE */ gpsd_report(LOG_DATA, "SiRF: FV 0x06: subtype='%s' mask={DEVICEID}\n", session->subtype); return DEVICEID_IS; } -#endif /* ALLOW_RECONFIGURE */ static gps_mask_t sirf_msg_navdata(struct gps_device_t *session, unsigned char *buf, size_t len) @@ -1022,10 +1024,8 @@ gps_mask_t sirf_parse(struct gps_device_t * session, unsigned char *buf, gpsd_report(LOG_PROG, "SiRF: unused Raw Tracker Data 0x05\n"); return 0; -#ifdef ALLOW_RECONFIGURE case 0x06: /* Software Version String MID 6 */ return sirf_msg_swversion(session, buf, len); -#endif /* ALLOW_RECONFIGURE */ case 0x07: /* Clock Status Data MID 7 */ gpsd_report(LOG_PROG, "SiRF: unused CLK 0x07\n"); |