Move RFID_SERIAL.flushinput()
I think this makes more sense in the RFID reading loop Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
27fdb0fd9c
commit
4b3d5282ae
2
doors.py
2
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
|
||||
|
|
Loading…
Reference in New Issue