Skip to content

Commit 148a439

Browse files
authored
MFRC630: Fix decoding not returning the data, but all 0's
Fix for https://forum.pycom.io/topic/6981/pyscan-nfc-rfid-reading-issue/ Decoding a NFC card would previously return all 0's because of this bug. Instead of returning the data, we would return the length, which would make the following function calls print all 0's instead of the decoded data. I was not able to test this personally because of a lack of decodable keycards
1 parent 01ced27 commit 148a439

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shields/lib/MFRC630.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def mfrc630_MF_read_block(self, block_address, dest):
370370
buffer_length = self.mfrc630_fifo_length()
371371
rx_len = buffer_length if (buffer_length <= 16) else 16
372372
dest = self.mfrc630_read_fifo(rx_len)
373-
return rx_len
373+
return dest
374374

375375

376376
def mfrc630_iso14443a_WUPA_REQA(self, instruction):

0 commit comments

Comments
 (0)