From 4b3d5282ae2cd7c5c12aa9051b8a7731d17c6106 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Tue, 7 Apr 2015 14:24:55 -0400 Subject: [PATCH] Move RFID_SERIAL.flushinput() I think this makes more sense in the RFID reading loop Signed-off-by: Anna Schumaker --- doors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doors.py b/doors.py index 36686e5..01bcd54 100644 --- a/doors.py +++ b/doors.py @@ -98,7 +98,6 @@ def verify_key(key): open_door() time.sleep(5) close_door() - RFID_SERIAL.flushInput() # ignore errors, no data while True: @@ -110,3 +109,4 @@ while True: key = string[1:11] #exclude start x0A and stop x0D bytes print(key) verify_key(key) + RFID_SERIAL.flushInput() # ignore errors, no data