summaryrefslogtreecommitdiff
path: root/driver_ubx.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-12 14:04:28 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-12 14:04:28 -0500
commitf0657986d798487c3ed8b652d7d4947bea154d76 (patch)
tree0ce8655b5e0dc37165896f4a72f2912fc609c8f1 /driver_ubx.c
parent9b14a8cd3a90e005c6f5f0708119ad839243d812 (diff)
downloadgpsd-f0657986d798487c3ed8b652d7d4947bea154d76.tar.gz
Virtuous code removal.
The can't-turn-off-NMEA bug went away. I think it was the port ID fix to the u-blox driver, though I don't see how. I'll take it....
Diffstat (limited to 'driver_ubx.c')
-rw-r--r--driver_ubx.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/driver_ubx.c b/driver_ubx.c
index 9205b8f7..d7c9892c 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -525,11 +525,6 @@ static gps_mask_t parse_input(struct gps_device_t *session)
session->packet.outbuflen);
#ifdef NMEA_ENABLE
} else if (session->packet.type == NMEA_PACKET) {
- if (session->mode == O_OPTIMIZE && !session->driver.ubx.user_switched) {
- gpsd_report(session->context->debug, LOG_WARN,
- "binary mode change failed, unsuppressed NMEA detected.\n");
- ubx_mode(session, MODE_NMEA);
- }
return nmea_parse((char *)session->packet.outbuffer, session);
#endif /* NMEA_ENABLE */
} else
@@ -621,21 +616,9 @@ static void ubx_event_hook(struct gps_device_t *session, event_t event)
/*
* Turn off NMEA output, turn on UBX on this port.
- *
- * Note: this may fail to actually turn off NMEA if the
- * device's firmware image has been configured to disallow
- * it. The Navsys GR601W, aka "Macx-1", is one example. We
- * can recognize it as a UBX because it responds to a MON_VER
- * probe, and it will start emitting UBX packets on command,
- * but it won't stop emitting NMEA packets.
- *
- * This is what the user_switched variable deals with. When
- * the unsuppressed ASCII packets come through, binary mode
- * will be switched off to reduce traffic.
*/
if (session->mode == O_OPTIMIZE) {
ubx_mode(session, MODE_BINARY);
- session->driver.ubx.user_switched = false;
}
} else if (event == event_deactivate) {
/*@ -type @*/
@@ -902,7 +885,6 @@ static void ubx_mode(struct gps_device_t *session, int mode)
gpsd_get_parity(session),
gpsd_get_stopbits(session),
mode);
- session->driver.ubx.user_switched = (mode == MODE_NMEA);
}
static bool ubx_speed(struct gps_device_t *session,