From a9254030ed6544a2565bd5bbb20206f5c5475f53 Mon Sep 17 00:00:00 2001 From: michael dye Date: Sun, 21 Apr 2024 11:34:03 -0600 Subject: [PATCH 1/2] fix #52 --- adafruit_rfm69.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_rfm69.py b/adafruit_rfm69.py index 23df7f5..acf06b5 100644 --- a/adafruit_rfm69.py +++ b/adafruit_rfm69.py @@ -312,7 +312,7 @@ def __init__( # pylint: disable=invalid-name self.reset() # Reset the chip. # Check the version of the chip. version = self._read_u8(_REG_VERSION) - if version != 0x24: + if version not in [0x23, 0x24]: raise RuntimeError("Invalid RFM69 version, check wiring!") self.idle() # Enter idle state. # Setup the chip in a similar way to the RadioHead RFM69 library. From a8a052c15111a9227015a7268a4a05ccfa45e916 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 21 Apr 2024 21:16:47 -0400 Subject: [PATCH 2/2] use tuple instead of list for versions --- adafruit_rfm69.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_rfm69.py b/adafruit_rfm69.py index acf06b5..407407f 100644 --- a/adafruit_rfm69.py +++ b/adafruit_rfm69.py @@ -312,7 +312,7 @@ def __init__( # pylint: disable=invalid-name self.reset() # Reset the chip. # Check the version of the chip. version = self._read_u8(_REG_VERSION) - if version not in [0x23, 0x24]: + if version not in (0x23, 0x24): raise RuntimeError("Invalid RFM69 version, check wiring!") self.idle() # Enter idle state. # Setup the chip in a similar way to the RadioHead RFM69 library.