From 7d224034ee774baa01d392e110a08ed03a06493d Mon Sep 17 00:00:00 2001 From: felmue Date: Sun, 1 Sep 2024 18:23:49 +0200 Subject: [PATCH] libs/driver/mfrc522: Fix RFID write. 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 --- m5stack/libs/driver/mfrc522/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m5stack/libs/driver/mfrc522/__init__.py b/m5stack/libs/driver/mfrc522/__init__.py index aa7eeeb2..942a72cd 100755 --- a/m5stack/libs/driver/mfrc522/__init__.py +++ b/m5stack/libs/driver/mfrc522/__init__.py @@ -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(