clear input buffer trunk V0.8.0

Thu, 12 Dec 2013 19:37:11 +0100

author
Malte Bayer <mbayer@neo-soft.org>
date
Thu, 12 Dec 2013 19:37:11 +0100
branch
trunk
changeset 39
7622e51b6a89
parent 38
f7b803e6448b
child 40
8a7f3d5d92ce

clear input buffer

victrond.py file | annotate | diff | comparison | revisions
--- a/victrond.py	Tue Sep 27 15:19:29 2011 +0200
+++ b/victrond.py	Thu Dec 12 19:37:11 2013 +0100
@@ -135,6 +135,9 @@
             print "ERROR: Query / Response out of sync! " +\
                 tempret[:len(cmd)] + " -> " + cmd
             ret = -1
+            print "clearing input buffer..."
+            for num in range(3):
+                self.ser.readline()
 
         return ret
 

mercurial