diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2009-01-24 19:49:36 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2009-01-24 19:49:36 +0000 |
commit | 112666d778a35610c595230c5c42cea29d54a683 (patch) | |
tree | 78e00c05318ce194e61de11a44cc12aeb7d8c0d3 /driver_proto.c | |
parent | e3f5daa5f7e00c1b3a7ef6d57a98ba3fad13dea5 (diff) | |
download | gpsd-112666d778a35610c595230c5c42cea29d54a683.tar.gz |
more little fixes
Diffstat (limited to 'driver_proto.c')
-rw-r--r-- | driver_proto.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/driver_proto.c b/driver_proto.c index 8f645d42..8736ed8c 100644 --- a/driver_proto.c +++ b/driver_proto.c @@ -321,6 +321,17 @@ static bool _proto__set_speed(struct gps_device_t *session, speed_t speed) */ static void _proto__set_mode(struct gps_device_t *session, int mode) { + if (mode == MODE_NMEA) { + // _proto__to_nmea(session->gpsdata.gps_fd,session->gpsdata.baudrate); /* send the mode switch control string */ + session->gpsdata.driver_mode = 0; /* NMEA */ + (void)gpsd_switch_driver(session, "Generic NMEA"); + } else { + session->back_to_nmea = false; + session->gpsdata.driver_mode = 1; /* binary */ + } +} + +{ if (mode == 0) { set_mode(session, session->gpsdata.baudrate); session->gpsdata.driver_mode = 0; |