Skip to content

Commit 0cca768

Browse files
committed
proofread docs
1 parent a3d8131 commit 0cca768

File tree

11 files changed

+32
-43
lines changed

11 files changed

+32
-43
lines changed

circuitpython_nrf24l01/fake_ble.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ class QueueElement:
9696
:param bytes,bytearray buffer: the validated BLE payload (not including
9797
the CRC checksum). The buffer passed here is decoded into this class's
9898
properties.
99-
100-
.. versionadded:: v2.1.0
10199
"""
102100

103101
def __init__(self, buffer):

circuitpython_nrf24l01/network/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def __init__(self, spi, csn, ce_pin, spi_frequency=10000000):
173173
self.max_message_length = 144 #: The maximum length of a frame's message.
174174
#: The queue (FIFO) of recieved frames for this node
175175
self.queue = FrameQueueFrag()
176-
#: A buffer containing the last frame received by the network node
176+
#: A buffer containing the last frame handled by the network node
177177
self.frame_buf = RF24NetworkFrame()
178178
self.address_suffix = bytearray([0xC3, 0x3C, 0x33, 0xCE, 0x3E, 0xE3])
179179
"""Each byte in this `bytearray` corresponds to the unique byte per pipe and

circuitpython_nrf24l01/rf24_mesh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def release_address(self) -> bool:
9292
return True
9393
return False
9494

95-
def renew_address(self, timeout: int = 7):
95+
def renew_address(self, timeout: int = 7.5):
9696
"""Connect to the mesh network and request a new `node_address`."""
9797
if self._rf24.available():
9898
self.update()

docs/conf.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,19 @@
1818
"sphinx.ext.todo",
1919
"sphinx.ext.viewcode",
2020
"sphinx.ext.graphviz",
21-
"sphinx_immaterial"
21+
"sphinx_immaterial",
2222
# "rst2pdf.pdfbuilder", # for local pdf builder support
2323
]
2424

2525
# Uncomment the below if you use native CircuitPython modules such as
2626
# digitalio, micropython and busio. List the modules you use. Without it, the
2727
# autodoc module docs will fail to generate with a warning.
28-
autodoc_mock_imports = ["digitalio", "busio", "usb_hid", "microcontroller", "logging"]
28+
autodoc_mock_imports = ["digitalio", "busio", "microcontroller"]
2929
autodoc_member_order = "bysource"
3030

3131
intersphinx_mapping = {
3232
"python": ("https://docs.python.org/3", None),
3333
"CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
34-
"Adafruit_logging": (
35-
"https://circuitpython.readthedocs.io/projects/logging/en/latest/",
36-
None,
37-
),
3834
}
3935

4036
html_baseurl = "https://circuitpython-nrf24l01.readthedocs.io/"

docs/core_api/advanced_api.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,16 +271,16 @@ Debugging Output
271271
Changed this method's name from the private method ``_dump_pipes()`` to a public method
272272
``print_pipes()``.
273273

274-
.. automethod:: circuitpython_nrf24l01.rf24.address_repr
274+
.. autofunction:: circuitpython_nrf24l01.rf24.address_repr
275275

276-
This method is primarily used in :meth:`~RF24.print_details()` to
276+
This method is primarily used in :meth:`~RF24.print_pipes()` to
277277
display how the address is used by the radio.
278278

279279
.. code-block:: python
280280
281281
>>> from circuitpython_nrf24l01.rf24 import address_repr
282282
>>> address_repr(b"1Node")
283-
'65646f4e31'
283+
'65646F4E31'
284284
285285
:param bytes,bytearray buf: The buffer of bytes to convert into a hexlified
286286
string.

docs/core_api/ble_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ FakeBLE class
361361

362362
.. automethod:: circuitpython_nrf24l01.fake_ble.FakeBLE.interrupt_config
363363

364-
.. warning:: The :py:attr:`circuitpython_nrf24l01.rf24.RF24.irq_df`
364+
.. warning:: The :py:attr:`~circuitpython_nrf24l01.rf24.RF24.irq_df`
365365
attribute is not implemented for BLE operations.
366366

367367
.. seealso::

docs/index.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,13 @@ The `adafruit_bus_device`, `Adafruit_Blinka library <https://github.com/adafruit
129129
and `SpiDev <https://pypi.org/project/spidev/>`_ libraries
130130
are installed automatically on Linux when installing this library.
131131

132-
.. versionadded:: 2.1.0 Added support for the
133-
`SpiDev <https://pypi.org/project/spidev/>`_ module
132+
.. versionadded:: 2.1.0
133+
Added support for the `SpiDev <https://pypi.org/project/spidev/>`_ module
134134

135-
.. important:: This library supports Python 3.7 or newer because it use
136-
the function :py:func:`time.monotonic_ns()` which returns an arbitrary time "counter"
137-
as an `int` of nanoseconds. CircuitPython firmware also supports :py:func:`time.monotonic_ns()`.
135+
.. important::
136+
This library supports Python 3.7 or newer because it uses the function
137+
:py:func:`time.monotonic_ns()` which returns an arbitrary time "counter" as an `int` of
138+
nanoseconds. CircuitPython firmware also supports :py:func:`time.monotonic_ns()`.
138139

139140

140141
Installing from PyPI
@@ -196,7 +197,10 @@ to the MCU via a digital input pin during the interrupt example.
196197
Using The Examples
197198
==================
198199

199-
See `examples <examples.html>`_ for testing certain features of this the library. The examples were developed and tested on both Raspberry Pi and ItsyBitsy M4. Pins have been hard coded in the examples for the corresponding device, so please adjust these accordingly to your circuitpython device if necessary.
200+
See `examples <examples.html>`_ for testing certain features of this the library.
201+
The examples were developed and tested on both Raspberry Pi and ItsyBitsy M4.
202+
Pins have been hard coded in the examples for the corresponding device, so please adjust these
203+
accordingly to your circuitpython device if necessary.
200204

201205
For an interactive REPL
202206
---------------------------
@@ -205,7 +209,8 @@ All examples can be imported from within an interactive python REPL.
205209

206210
1. Make sure the examples are located in the current working directory.
207211
On CircuitPython devices, this will be the root directory of the CIRCUITPY drive.
208-
2. Import everything from desired the example. The following code snippet demonstrates running the `Simple Test example <examples.html#simple-test>`_
212+
2. Import everything from the desired example. The following code snippet demonstrates running the
213+
`Simple Test example <examples.html#simple-test>`_
209214

210215
.. code-block:: python
211216

docs/network_docs/mesh_api.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ Basic API
5555
for quicker operation.
5656

5757
:param bytes,bytearray message: The frame's `message` to be transmitted.
58-
:param str,int message_type: The `int` that describes the frame header's `message_type`.
5958

60-
.. note:: Be mindful of the message's size as this cannot exceed
61-
`MAX_FRAG_SIZE` (24 bytes) if `fragmentation` is disabled. If `fragmentation` is
62-
enabled (it is by default), then the message's size must be less than
59+
.. note::
60+
Be mindful of the message's size as this cannot exceed `MAX_FRAG_SIZE` (24 bytes) if
61+
`fragmentation` is disabled. If `fragmentation` is enabled (it is by default), then
62+
the message's size must be less than
6363
:attr:`~circuitpython_nrf24l01.rf24_network.RF24Network.max_message_length`.
64+
:param str,int message_type: The `int` that describes the frame header's `message_type`.
6465
:param int to_node_id: The unique mesh network `node_id` of the frame's destination.
6566
Defaults to ``0`` (which is reserved for the master node.
6667

docs/network_docs/network_api.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ Basic API
107107
A `bool` describing if the message has been transmitted. This does not necessarily
108108
describe if the message has been received at its target destination.
109109

110-
.. note::
111-
This function will always return `True` if a message is directed to a node's pipe
112-
that does not have `auto_ack` enabled (which will likely be pipe 0 in most network
113-
contexts).
114110
.. tip:: |use_msg_t|
115111

116112
Advanced API
@@ -130,10 +126,13 @@ Advanced API
130126
describe if the message has been received at its target destination.
131127

132128
.. note::
133-
This function will always return if a message is directed to a node's pipe
129+
For multicasted messages, the radio's `auto_ack` feature is not used.
130+
131+
This function will always return `True` if a message is directed to a node's pipe
134132
that does not have `auto_ack` enabled (which will likely be pipe 0 in most network
135133
contexts).
136-
.. tip:: To ensure a message has been delivered to its target destination, set the
134+
.. tip::
135+
To ensure a message has been delivered to its target destination, set the
137136
header's `message_type` to an `int` in range [65, 127]. This will invoke a
138137
`NETWORK_ACK` response message.
139138

@@ -145,9 +144,7 @@ Advanced API
145144

146145
.. code-block:: python
147146
148-
from circuitpython_nrf24l01.network.structs import (
149-
FrameQueue, RF24NetworkFrame, RF24NetworkHeader
150-
)
147+
from circuitpython_nrf24l01.network.structs import FrameQueue, RF24NetworkFrame, RF24NetworkHeader
151148
152149
my_q = FrameQueue()
153150
for i in range(my_q.max_queue_size):

docs/network_docs/shared_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Order of Inheritence
8787
}
8888

8989
The ``RadioMixin`` and ``NetworkMixin`` classes are not documented directly. Instead, this
90-
documentation follows the OSI (Open Systems Interconnection) model. This is done to mimmic how the
90+
documentation follows the OSI (Open Systems Interconnection) model. This is done to mimic how the
9191
TMRh20 C++ libraries and documentation are structured.
9292

9393
Consequentially, all functions and members inherited from the ``NetworkMixin`` class are

0 commit comments

Comments
 (0)