Skip to content

Commit c502696

Browse files
authored
Merge pull request #14 from jerryneedell/jerryn_fix_header
fix header issue if packet filtered
2 parents 7fc4c76 + 61f84ca commit c502696

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)