@@ -655,11 +655,13 @@ def send(self, data, timeout=2., keep_listening=False,
655
655
The tx_header defaults to using the Broadcast addresses. It may be overidden
656
656
by specifying a 4-tuple of bytes containing (To,From,ID,Flags)
657
657
The timeout is just to prevent a hang (arbitrarily set to 2 seconds)
658
+ The keep_listening argument should be set to True if you want to start listening
659
+ automatically after the packet is sent. The default setting is False.
658
660
"""
659
661
# Disable pylint warning to not use length as a check for zero.
660
662
# This is a puzzling warning as the below code is clearly the most
661
663
# efficient and proper way to ensure a precondition that the provided
662
- # buffer be within an expected range of bounds. Disable this check.
664
+ # buffer be within an expected range of bounds. Disable this check.
663
665
# pylint: disable=len-as-condition
664
666
assert 0 < len (data ) <= 252
665
667
assert len (tx_header ) == 4 , "tx header must be 4-tuple (To,From,ID,Flags)"
@@ -703,7 +705,7 @@ def receive(self, timeout=0.5, keep_listening=True, with_header=False,
703
705
"""Wait to receive a packet from the receiver. Will wait for up to timeout_s amount of
704
706
seconds for a packet to be received and decoded. If a packet is found the payload bytes
705
707
are returned, otherwise None is returned (which indicates the timeout elapsed with no
706
- reception). If timeout is None it isnot used ( for use with interrupts)
708
+ reception). If timeout is None it is not used ( for use with interrupts)
707
709
If keep_listening is True (the default) the chip will immediately enter listening mode
708
710
after reception of a packet, otherwise it will fall back to idle mode and ignore any
709
711
future reception.
0 commit comments