Fix timing in readserial.py - use 10 bits per byte.
There is also a start bit, so 8N1 serial should use 10 bits to a byte.
diff --git a/tools/readserial.py b/tools/readserial.py
index fec2811..4b47b14 100755
--- a/tools/readserial.py
+++ b/tools/readserial.py
@@ -18,6 +18,9 @@
# Alter timing reports based on how much time would be spent writing
# to serial.
ADJUSTBAUD = 1
+# Number of bits in a transmitted byte - 8N1 is 1 start bit + 8 data
+# bits + 1 stop bit.
+BITSPERBYTE = 10
def readserial(infile, logfile, baudrate):
lasttime = 0
@@ -54,7 +57,7 @@
if isnewline:
delta = curtime - starttime
if ADJUSTBAUD:
- delta -= float(charcount * 9) / baudrate
+ delta -= float(charcount * BITSPERBYTE) / baudrate
out += "%06.3f: " % delta
isnewline = 0
oc = ord(c)