Skip to content

Commit d0b79ae

Browse files
committed
clean up some comments
1 parent ddcacf8 commit d0b79ae

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

adafruit_rfm9x.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,11 +655,13 @@ def send(self, data, timeout=2., keep_listening=False,
655655
The tx_header defaults to using the Broadcast addresses. It may be overidden
656656
by specifying a 4-tuple of bytes containing (To,From,ID,Flags)
657657
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.
658660
"""
659661
# Disable pylint warning to not use length as a check for zero.
660662
# This is a puzzling warning as the below code is clearly the most
661663
# 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.
663665
# pylint: disable=len-as-condition
664666
assert 0 < len(data) <= 252
665667
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,
703705
"""Wait to receive a packet from the receiver. Will wait for up to timeout_s amount of
704706
seconds for a packet to be received and decoded. If a packet is found the payload bytes
705707
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)
707709
If keep_listening is True (the default) the chip will immediately enter listening mode
708710
after reception of a packet, otherwise it will fall back to idle mode and ignore any
709711
future reception.

examples/rfm9x_rpi_interrupt.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# Simple demo of sending and recieving data with the RFM95 LoRa radio.
2-
# Author: Tony DiCola
1+
# Example using Interrupts to send a message and then wait indefinitely for messages
2+
# to be received. Interrupts are used only for receive. sending is done with polling.
3+
# This example is for systems that support interrupts like the Raspberry Pi with "blinka"
4+
# CircuitPython does not support interrupts so it will not work on Circutpython boards
5+
# Author: Tony DiCola, Jerry Needell
36
import time
47
import board
58
import busio

examples/rfm9x_transmit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import digitalio
88
import adafruit_rfm9x
99

10+
# set the time interval (seconds) for sending packets
1011
transmit_interval=10
1112

1213
# Define radio parameters.

0 commit comments

Comments
 (0)