Skip to content

Commit 8f44d2f

Browse files
committed
fix error when no header requested
1 parent 011fdfb commit 8f44d2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_rfm69.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ def receive(self, timeout=0.5, keep_listening=True, with_header=False,
782782
if (rx_filter != _RH_BROADCAST_ADDRESS and packet[0] != _RH_BROADCAST_ADDRESS
783783
and packet[0] != rx_filter):
784784
packet = None
785-
if not with_header: # skip the header if not wanted
785+
elif not with_header: # skip the header if not wanted
786786
packet = packet[4:]
787787

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

0 commit comments

Comments
 (0)