summaryrefslogtreecommitdiff
path: root/driver_nmea2000.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-26 07:28:57 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-26 07:28:57 -0500
commitaad880be81bdb701de3aaab7b791f7e0dd60be45 (patch)
tree766253d946df12864d80412f843707ea94b20f43 /driver_nmea2000.c
parent3a6cf604f7b4a6ce20d4cfd05c5f0b63ff45edb7 (diff)
downloadgpsd-aad880be81bdb701de3aaab7b791f7e0dd60be45.tar.gz
Pretend CAN devices are pseudo-ttys to disable adaptive delays.
All regression tests pass.
Diffstat (limited to 'driver_nmea2000.c')
-rw-r--r--driver_nmea2000.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/driver_nmea2000.c b/driver_nmea2000.c
index d9b6e557..e2bc0fa1 100644
--- a/driver_nmea2000.c
+++ b/driver_nmea2000.c
@@ -1643,9 +1643,16 @@ int nmea2000_open(struct gps_device_t *session)
nmea2000_units[can_net][l] = NULL;
}
}
+
+ /*
+ * For device-classification purposes, pretend this is a fast pseudo-tty.
+ * What we mainly want out of this is to disable the adaptive-delay logic,
+ * which causes loss of CAN packets.
+ */
session->gpsdata.dev.parity = 'n';
session->gpsdata.dev.baudrate = 250000;
session->gpsdata.dev.stopbits = 0;
+ session->sourcetype = source_pty;
return session->gpsdata.gps_fd;
}
#endif /* of ifndef S_SPLINT_S */