Skip to content

Commit 775399c

Browse files
committed
restructure test for ticks_ms
1 parent 7592e30 commit 775399c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

adafruit_rfm9x.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
import adafruit_bus_device.spi_device as spidev
1818
from micropython import const
1919

20+
HAS_SUPERVISOR = False
21+
2022
try:
2123
import supervisor
2224

23-
HAS_SUPERVISOR = True
25+
if hasattr(supervisor, "ticks_ms"):
26+
HAS_SUPERVISOR = True
2427
except ImportError:
25-
HAS_SUPERVISOR = False
26-
28+
pass
2729
__version__ = "0.0.0-auto.0"
2830
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RFM9x.git"
2931

0 commit comments

Comments
 (0)