changes
This commit is contained in:
parent
fe222c75c1
commit
5edd9f1041
6
main.py
6
main.py
@ -50,6 +50,8 @@ GPIO.setmode(GPIO.BCM)
|
|||||||
greenLed = 14
|
greenLed = 14
|
||||||
redLed = 4
|
redLed = 4
|
||||||
|
|
||||||
|
bad = False
|
||||||
|
|
||||||
GPIO.setup(greenLed, GPIO.OUT)
|
GPIO.setup(greenLed, GPIO.OUT)
|
||||||
GPIO.output(greenLed, GPIO.LOW)
|
GPIO.output(greenLed, GPIO.LOW)
|
||||||
GPIO.setup(redLed, GPIO.OUT)
|
GPIO.setup(redLed, GPIO.OUT)
|
||||||
@ -67,10 +69,12 @@ class CliInteraction(UserInteraction):
|
|||||||
|
|
||||||
def badCred():
|
def badCred():
|
||||||
print("Bad credential!")
|
print("Bad credential!")
|
||||||
|
bad = True
|
||||||
# time.sleep(2)
|
# time.sleep(2)
|
||||||
while True:
|
while True:
|
||||||
# GPIO.output(14, GPIO.LOW)
|
# GPIO.output(14, GPIO.LOW)
|
||||||
print("Waiting for device...")
|
print("Waiting for device...")
|
||||||
|
bad = False
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
# GPIO.output(14, GPIO.LOW)
|
# GPIO.output(14, GPIO.LOW)
|
||||||
@ -169,6 +173,8 @@ while True:
|
|||||||
pk_neg3 = aaguid_data["pk_neg3"]
|
pk_neg3 = aaguid_data["pk_neg3"]
|
||||||
pickled = aaguid_data["pickled"]
|
pickled = aaguid_data["pickled"]
|
||||||
|
|
||||||
|
if bad:
|
||||||
|
raise Exception
|
||||||
|
|
||||||
credentials = pickle.loads(pickled)
|
credentials = pickle.loads(pickled)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user