Skip to content

Commit

Permalink
libs/driver/mfrc522: Fix RFID write.
Browse files Browse the repository at this point in the history
Fix below error when writing to RFID:

  File "driver/mfrc522/__init__.py", line 784, in pcd_mifare_transcieve
TypeError: unsupported types for __add__: 'memoryview', 'memoryview'

Signed-off-by: felmue <[email protected]>
  • Loading branch information
felmue authored and lbuque committed Sep 29, 2024
1 parent 8e2099c commit 7d22403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion m5stack/libs/driver/mfrc522/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def pcd_mifare_transceive(self, send_data, acceptTimeout=False):
if result != self.STATUS_OK:
return result

cmd_buffer = send_data + self._CRC_BUFFER
cmd_buffer = memoryview(bytearray(send_data) + bytearray(self._CRC_BUFFER))

# Transceive the data, store the reply in cmd_buffer[]
status, rsp_buffer, valid_bits = self.pcd_communicate_with_picc(
Expand Down

0 comments on commit 7d22403

Please sign in to comment.