Skip to content
Permalink
Browse files

another fix for bad packet

  • Loading branch information...
jerryneedell committed Dec 30, 2018
1 parent 8f44d2f commit 6ebc70c7cb7fa3bd8633f09b40e965ee7a65aa4d
Showing with 5 additions and 5 deletions.
  1. +5 −5 adafruit_rfm69.py
@@ -779,11 +779,11 @@ def receive(self, timeout=0.5, keep_listening=True, with_header=False,
else:
packet = bytearray(fifo_length)
device.readinto(packet)
if (rx_filter != _RH_BROADCAST_ADDRESS and packet[0] != _RH_BROADCAST_ADDRESS
and packet[0] != rx_filter):
packet = None
elif not with_header: # skip the header if not wanted
packet = packet[4:]
if (rx_filter != _RH_BROADCAST_ADDRESS and packet[0] != _RH_BROADCAST_ADDRESS
and packet[0] != rx_filter):
packet = None
elif not with_header: # skip the header if not wanted
packet = packet[4:]

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

0 comments on commit 6ebc70c

Please sign in to comment.
You can’t perform that action at this time.