Skip to content

Commit 8886bdf

Browse files
committed
fix documentation problems
1 parent 926b491 commit 8886bdf

File tree

7 files changed

+35
-8
lines changed

7 files changed

+35
-8
lines changed

adafruit_bluefruit_connect/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# THE SOFTWARE.
2222
"""
2323
`adafruit_bluefruit_connect`
24-
====================================================
24+
============================
2525
2626
This module helps you to communicate with the Adafruit Bluefruit Connect app or use its protocols.
2727
@@ -32,7 +32,7 @@
3232
3333
**Hardware:**
3434
35-
inline format: "* `Adafruit Feather nRF52840 Express <https://www.adafruit.com/product/4062>`_"
35+
Adafruit Feather nRF52840 Express <https://www.adafruit.com/product/4062>
3636
3737
**Software and Dependencies:**
3838

adafruit_bluefruit_connect/button_packet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
2222
"""
23-
`adafruit_bluefruit_connect.controller_packet`
23+
`adafruit_bluefruit_connect.button_packet`
2424
====================================================
2525
2626
Bluefruit Connect App Button data packet (button_name, pressed/released)

adafruit_bluefruit_connect/location_packet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
2222
"""
23-
`adafruit_bluefruit_connect.controller_packet`
23+
`adafruit_bluefruit_connect.location_packet`
2424
====================================================
2525
2626
Bluefruit Connect App geographical location packet.

adafruit_bluefruit_connect/packet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Packet:
5959

6060
@classmethod
6161
def register_packet_type(cls):
62-
"""Register a new packet type, using this class and its `cls._TYPE_HEADER`
62+
"""Register a new packet type, using this class and its ``cls._TYPE_HEADER``.
6363
The ``from_bytes()`` and ``from_stream()`` methods will then be able
6464
to recognize this type of packet.
6565
"""
@@ -97,11 +97,11 @@ def from_stream(cls, stream):
9797
"""Read the next packet from the incoming stream. Wait as long as the timeout
9898
set on stream, using its own preset timeout.
9999
Return None if there was no input, otherwise return an instance
100-
of one of the packet classes registered with `Packet`.
100+
of one of the packet classes registered with ``Packet``.
101101
Raise an Error if the packet was not recognized or was malformed
102102
103103
:param stream stream: an input stream that provides standard stream read operations,
104-
such as `ble.UARTServer` or `busio.UART`.
104+
such as ``ble.UARTServer`` or ``busio.UART``.
105105
"""
106106
header = stream.read(2)
107107
if len(header) != 2 or header[0] != ord(b'!'):

docs/api.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,26 @@
44
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
55
.. use this format as the module name: "adafruit_foo.foo"
66
7-
.. automodule:: adafruit_bluefruit_connect
7+
.. automodule:: adafruit_bluefruit_connect.packet
8+
:members:
9+
10+
.. automodule:: adafruit_bluefruit_connect.accelerometer_packet
11+
:members:
12+
13+
.. automodule:: adafruit_bluefruit_connect.button_packet
14+
:members:
15+
16+
.. automodule:: adafruit_bluefruit_connect.color_packet
17+
:members:
18+
19+
.. automodule:: adafruit_bluefruit_connect.gyro_packet
20+
:members:
21+
22+
.. automodule:: adafruit_bluefruit_connect.location_packet
23+
:members:
24+
25+
.. automodule:: adafruit_bluefruit_connect.magnetometer_packet
26+
:members:
27+
28+
.. automodule:: adafruit_bluefruit_connect.quaternion_packet
829
:members:

docs/examples.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ Ensure your device works with this simple test.
66
.. literalinclude:: ../examples/bluefruit_connect_simpletest.py
77
:caption: examples/bluefruit_connect_simpletest.py
88
:linenos:
9+
10+
This test demonstrates controlling an Adafruit Crickit board with Bluetooth.
11+
12+
.. literalinclude:: ../examples/bluefruit_connect_crickit_test.py
13+
:caption: examples/bluefruit_connect_crickit_test.py
14+
:linenos:

0 commit comments

Comments
 (0)