Skip to content

Commit 6ebc70c

Browse files
committed
another fix for bad packet
1 parent 8f44d2f commit 6ebc70c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

adafruit_rfm69.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -779,11 +779,11 @@ def receive(self, timeout=0.5, keep_listening=True, with_header=False,
779779
else:
780780
packet = bytearray(fifo_length)
781781
device.readinto(packet)
782-
if (rx_filter != _RH_BROADCAST_ADDRESS and packet[0] != _RH_BROADCAST_ADDRESS
783-
and packet[0] != rx_filter):
784-
packet = None
785-
elif not with_header: # skip the header if not wanted
786-
packet = packet[4:]
782+
if (rx_filter != _RH_BROADCAST_ADDRESS and packet[0] != _RH_BROADCAST_ADDRESS
783+
and packet[0] != rx_filter):
784+
packet = None
785+
elif not with_header: # skip the header if not wanted
786+
packet = packet[4:]
787787

788788
# Listen again if necessary and return the result packet.
789789
if keep_listening:

0 commit comments

Comments
 (0)