Skip to content

Commit 4dafc33

Browse files
committed
pylint
1 parent b300772 commit 4dafc33

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

examples/rfm9x_simpletest.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
# CS = digitalio.DigitalInOut(board.RFM9X_CS)
2020
# RESET = digitalio.DigitalInOut(board.RFM9X_RST)
2121

22-
# Define the onboard LED
23-
LED = digitalio.DigitalInOut(board.D13)
24-
LED.direction = digitalio.Direction.OUTPUT
22+
# Define the onboard LED
23+
LED = digitalio.DigitalInOut(board.D13)
24+
LED.direction = digitalio.Direction.OUTPUT
2525

2626
# Initialize SPI bus.
2727
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
@@ -36,9 +36,6 @@
3636
# high power radios like the RFM95 can go up to 23 dB:
3737
rfm9x.tx_power = 23
3838

39-
# Packet counter, incremented per tx
40-
packetNum = 0
41-
4239
# Send a packet. Note you can only send a packet up to 252 bytes in length.
4340
# This is a limitation of the radio packet size, so if you need to send larger
4441
# amounts of data you will need to break it into smaller send calls. Each send
@@ -53,12 +50,12 @@
5350
print('Waiting for packets...')
5451

5552
while True:
56-
5753
packet = rfm9x.receive()
5854
# Optionally change the receive timeout from its default of 0.5 seconds:
5955
#packet = rfm9x.receive(timeout=5.0)
6056
# If no packet was received during the timeout then None is returned.
6157
if packet is None:
58+
# Packet has not been received
6259
LED.value = False
6360
print('Received nothing! Listening again...')
6461
else:

0 commit comments

Comments
 (0)