summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-02-13 18:00:23 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-02-13 18:00:23 +0000
commit14253e6a710a62c5472b11d53f28ba73ca472726 (patch)
tree1a12b62c6f8778ed26bc336379cff780bd93c42a /serial.c
parent698c62a2f20eca2e711b2211da8a674b5b17bc42 (diff)
downloadgpsd-14253e6a710a62c5472b11d53f28ba73ca472726.tar.gz
SETTLE_TIME needs to be used in two places.
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/serial.c b/serial.c
index 7050257e..3f22b041 100644
--- a/serial.c
+++ b/serial.c
@@ -79,12 +79,7 @@ static int connect_at_speed(int ttyfd, struct gps_session_t *session, int speed)
tcflush(ttyfd, TCIOFLUSH);
buf[0] = '\0';
for (maxreads = 0; maxreads < NRATES; maxreads++) {
- /*
- * Give device time to settle and ship some data before reading.
- * Less than 1.25 seconds doesn't work under Linux 2.6.10 on
- * an Athlon 64 3400.
- */
- usleep(1250000);
+ usleep(SETTLE_TIME);
n = read(ttyfd, buf, sizeof(buf)-1);
if (n > 0) {
buf[n] = '\0';