Skip to content

Commit 61f84ca

Browse files
committed
fix header issue if packet filtered
1 parent 7fc4c76 commit 61f84ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_rfm9x.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ def receive(self, timeout=0.5, keep_listening=True, with_header=False,
633633
if (rx_filter != _RH_BROADCAST_ADDRESS and packet[0] != _RH_BROADCAST_ADDRESS
634634
and packet[0] != rx_filter):
635635
packet = None
636-
if not with_header: # skip the header if not wanted
636+
elif not with_header: # skip the header if not wanted
637637
packet = packet[4:]
638638
# Listen again if necessary and return the result packet.
639639
if keep_listening:

0 commit comments

Comments
 (0)