From 7eacbef3fa19f37e85d452787a605aad1396a4d2 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 3 Oct 2013 16:12:47 -0400 Subject: Change the logic for managing the drive mode bit to report reality... ...rather than setting it ad-hoc on a per-driver basis. --- driver_superstar2.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'driver_superstar2.c') diff --git a/driver_superstar2.c b/driver_superstar2.c index 64bbd97e..9cf22d24 100644 --- a/driver_superstar2.c +++ b/driver_superstar2.c @@ -474,19 +474,12 @@ static void superstar2_event_hook(struct gps_device_t *session, event_t event) */ static gps_mask_t superstar2_parse_input(struct gps_device_t *session) { - gps_mask_t st; - if (session->packet.type == SUPERSTAR2_PACKET) { - st = superstar2_dispatch(session, session->packet.outbuffer, - session->packet.length); - session->gpsdata.dev.driver_mode = MODE_BINARY; - return st; + return superstar2_dispatch(session, session->packet.outbuffer, + session->packet.length);; #ifdef NMEA_ENABLE } else if (session->packet.type == NMEA_PACKET) { - st = nmea_parse((char *)session->packet.outbuffer, session); - (void)gpsd_switch_driver(session, "Generic NMEA"); - session->gpsdata.dev.driver_mode = MODE_NMEA; - return st; + return nmea_parse((char *)session->packet.outbuffer, session); #endif /* NMEA_ENABLE */ } else return 0; -- cgit v1.2.1