diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-10-07 15:42:38 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-10-07 15:42:38 -0400 |
commit | d442e430c20a6457cf945417cbfb438779618723 (patch) | |
tree | 454010a6f3f060b7580a2a847d41dcffb9507788 /driver_ubx.c | |
parent | 3832c02413fc4e6dc06cfffd75456f04b0fb292c (diff) | |
download | gpsd-d442e430c20a6457cf945417cbfb438779618723.tar.gz |
Actually setting up a config block now.
Diffstat (limited to 'driver_ubx.c')
-rw-r--r-- | driver_ubx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/driver_ubx.c b/driver_ubx.c index 46f8b655..312256f0 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -68,11 +68,13 @@ static void ubx_msg_inf(unsigned char *buf, size_t data_len, const int debug); static void ubx_setup_cfg(struct gps_device_t *session) { + extern const struct gps_type_t ubx_binary; unsigned char *out = session->driver.ubx.port_settings; int id = 0; /* don't do this if the CFG_PRT response has already come back */ - if (session->driver.ubx.have_port_configuration) + if (session->device_type == &ubx_binary + && session->driver.ubx.have_port_configuration) return; switch(session->sourcetype) { @@ -146,9 +148,6 @@ static void ubx_setup_cfg(struct gps_device_t *session) out[18] = 0; /* res3 */ out[19] = 0; /* res3 */ /*@ +type @*/ - gpsd_report(session->context->debug, LOG_IO, - "Synthetic USART config block: %s\n", - gpsd_hexdump(out, UBX_CFG_LEN)); #else /* * Until uBlox reveals the black magic required to create these @@ -182,6 +181,9 @@ static void ubx_setup_cfg(struct gps_device_t *session) } /*@-charint@*/ #endif /* __FUTURE__ */ + gpsd_report(session->context->debug, LOG_SHOUT, + "Synthetic USART config block: %s\n", + gpsd_hexdump(out, UBX_CFG_LEN)); session->driver.ubx.have_port_configuration = true; } |