diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2006-11-21 08:30:20 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2006-11-21 08:30:20 +0000 |
commit | 0cf1f2fc0250b4fdf20dfc94a933af62c7cbbaf3 (patch) | |
tree | fd7443089fb67f8f867ff081fb6938ff960c9a8e /sirf.c | |
parent | 5e37b2d81a6c3625b847157e888471ea61b9d06c (diff) | |
download | gpsd-0cf1f2fc0250b4fdf20dfc94a933af62c7cbbaf3.tar.gz |
Make back_to_nmea a public flag (rather than a per-driver private flag)...
...that causes the driver's mode switcher to be invoked just after the
revert method. This makes the revert methods for SiRF and EverMore
unnecessary.
Diffstat (limited to 'sirf.c')
-rw-r--r-- | sirf.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -117,7 +117,7 @@ static void sirfbin_mode(struct gps_device_t *session, int mode) session->gpsdata.driver_mode = 0; /* NMEA */ (void)gpsd_switch_driver(session, "SiRF NMEA"); } else { - session->driver.sirf.back_to_nmea = false; + session->back_to_nmea = false; session->gpsdata.driver_mode = 1; /* binary */ } } @@ -768,14 +768,6 @@ static bool sirfbin_speed(struct gps_device_t *session, speed_t speed) return sirf_speed(session->gpsdata.gps_fd, speed); } -#ifdef ALLOW_RECONFIGURE -static void sirfbin_revert(struct gps_device_t *session) -{ - if (session->driver.sirf.back_to_nmea) - sirfbin_mode(session, 0); -} -#endif /* ALLOW_RECONFIGURE */ - /* this is everything we export */ struct gps_type_t sirf_binary = { @@ -796,7 +788,7 @@ struct gps_type_t sirf_binary = .rate_switcher = NULL, /* no sample-rate switcher */ .cycle_chars = -1, /* not relevant, no rate switch */ #ifdef ALLOW_RECONFIGURE - .revert = sirfbin_revert, /* might want to revert to NMEA */ + .revert = NULL, /* no reversion code */ #endif /* ALLOW_RECONFIGURE */ .wrapup = NULL, /* no close hook */ .cycle = 1, /* updates every second */ |