summaryrefslogtreecommitdiff
path: root/gpsctl.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-13 03:32:13 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-13 03:32:13 -0500
commit0ddafa77fbdbb2f573d879e060735ab6d3436735 (patch)
treead0a54116963fdf38b35df40f29eaccc1a5fb97c /gpsctl.c
parentb360367d400735a46c98f0fc0a604b479c19a1b2 (diff)
downloadgpsd-0ddafa77fbdbb2f573d879e060735ab6d3436735.tar.gz
Teach gpsctl to extract subtype information.
This degree of linger after packet sync is sufficient on a BU355 (SiRF-III).
Diffstat (limited to 'gpsctl.c')
-rw-r--r--gpsctl.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/gpsctl.c b/gpsctl.c
index fceb9881..99a5dc7a 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -181,27 +181,17 @@ static char /*@observer@*/ *gpsd_id( /*@in@ */ struct gps_device_t *session)
return (buf);
}
-static void ctlhook(struct gps_device_t *device, gps_mask_t changed UNUSED)
+static void ctlhook(struct gps_device_t *device UNUSED, gps_mask_t changed UNUSED)
/* recognize when we've achieved sync */
{
static int packet_counter = 0;
/*
- * Anything non-NMEA is an immediate lock.
- */
- if (device->device_type != NULL
- && device->device_type->packet_type > NMEA_PACKET)
- {
- hunting = false;
- (void) alarm(0);
- }
-
- /*
* If it's NMEA, go back around enough times for the type probes to
* reveal any secret identity (like SiRF or UBX) the chip might have.
+ * If it's not, getting more packets might fetch subtype information.
*/
- if (device->packet.type == NMEA_PACKET
- && packet_counter++ >= REDIRECT_SNIFF)
+ if (packet_counter++ >= REDIRECT_SNIFF)
{
hunting = false;
(void) alarm(0);