Merge branch '1.0-local' into 1.0

This commit is contained in:
xdrm-brackets 2017-02-24 10:15:10 +01:00
commit bc457ef31f
1 changed files with 13 additions and 12 deletions

View File

@ -20,20 +20,21 @@ MIFAREReader = MFRC522.MFRC522()
# If we have the UID, continue
if status == MIFAREReader.MI_OK:
while status != MIFAREReader.MI_OK:
# Print UID
suid = str(hex(uid[0]))[2:];
suid += '-' + str(hex(uid[1]))[2:];
suid += '-' + str(hex(uid[2]))[2:];
suid += '-' + str(hex(uid[3]))[2:];
# Scan for cards
(status,TagType) = MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL)
print suid;
# Get the UID of the card
(status,uid) = MIFAREReader.MFRC522_Anticoll()
exit(0);
else:
# Print UID
suid = str(hex(uid[0]))[2:];
suid += '-' + str(hex(uid[1]))[2:];
suid += '-' + str(hex(uid[2]))[2:];
suid += '-' + str(hex(uid[3]))[2:];
print 127;
exit(127);
print suid;
exit(0);