summaryrefslogtreecommitdiff
path: root/driver_tsip.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-16 16:26:02 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-16 16:26:02 +0000
commit27b869ce4eb2bb12ce8bdd4ea11cfeb9075bc465 (patch)
tree883402295f6702acb5316c2669137bcea6f80609 /driver_tsip.c
parent05afcd8e2e3ef96fd4e4a56dd788911c6f0815fa (diff)
downloadgpsd-27b869ce4eb2bb12ce8bdd4ea11cfeb9075bc465.tar.gz
Change the driver event set to be more orthogonal.
This had the expected effect, the N command can now works on SiRFs again because the subdevice probe is not called after every driver switch. One of the Trimbles has minor regression breakage on this change (two fewer reports emitted just after packet lock) but I'm not worrying about that as the TSIP driver needs to be upgraded to do CYCLE_END, anyway.
Diffstat (limited to 'driver_tsip.c')
-rw-r--r--driver_tsip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/driver_tsip.c b/driver_tsip.c
index 0951e50a..41220963 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -767,7 +767,8 @@ static ssize_t tsip_control_send(struct gps_device_t *session,
#ifdef ALLOW_RECONFIGURE
static void tsip_event_hook(struct gps_device_t *session, event_t event)
{
- if (event == event_configure && session->packet.counter == 0) {
+ /* FIXME: Resending this might not be needed on reactivation */
+ if (event == event_identified && event == event_reactivate) {
unsigned char buf[100];
/* I/O Options */
@@ -777,7 +778,7 @@ static void tsip_event_hook(struct gps_device_t *session, event_t event)
putbyte(buf,3,0x08); /* Aux: dBHz */
(void)tsip_write(session, 0x35, buf, 4);
}
- if (event == event_probe_subtype) {
+ if (event == event_configure) {
unsigned char buf[100];
switch (session->packet.counter) {