Enhance readserial.py to note when resetting timer.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 5 Dec 2009 18:44:39 +0000 (13:44 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 5 Dec 2009 18:44:39 +0000 (13:44 -0500)
tools/readserial.py

index 4524ca831fb7fe7a51ec2695e452bc7ca5ebe6cf..fec2811a7e557ef9333c8817c70a288162b1abb5 100755 (executable)
@@ -42,8 +42,10 @@ def readserial(infile, logfile, baudrate):
             starttime = curtime
             charcount = 0
             isnewline = 1
-            sys.stdout.write("\n")
-            logfile.write("\n")
+            msg = "\n\n======= %s (adjust=%d)\n" % (
+                time.asctime(time.localtime(curtime)), ADJUSTBAUD)
+            sys.stdout.write(msg)
+            logfile.write(msg)
         lasttime = curtime
 
         # Translate unprintable chars; add timestamps