commit 3147034552a4049027533e2b70629bcb01d95af4
from: Sven M. Hallberg <pesco@khjk.org>
date: Sun Jan  8 12:05:28 2023 UTC

reduce serial read timeout to 100ms

Unreliable responses from the board are not due to being busy, but due to
flaky serial receive code. If it missed our request, it will never answer,
so better to fail (and try again) early.

commit - db5d0306b37a3199decd3cec6be9ca5f6dd26c0b
commit + 3147034552a4049027533e2b70629bcb01d95af4
blob - 366e62a8ce4ef1b762839feafb40c1cbe1961ce2
blob + 5557490ae6ce6b86a9ad629f749e4aa2a8ce189b
--- mc5000.c
+++ mc5000.c
@@ -207,7 +207,7 @@ main(int argc, char *argv[])
 		t.c_cflag |= CLOCAL;		/* ignore "modem" status */
 		t.c_lflag = 0;			/* no echo, line canon. etc. */
 		t.c_cc[VMIN] = 0;		/* stop read() if... */
-		t.c_cc[VTIME] = 10;		/* ...no input after 1 s */
+		t.c_cc[VTIME] = 1;		/* ...no input after 100 ms */
 		if (tcsetattr(fileno(devf), TCSAFLUSH, &t) != 0)
 			err(1, "tcsetattr");