Skip to content

Commit 395c5a0

Browse files
authored
Merge pull request #24 from ktdreyer/docs-fixes
sphinx doc improvements
2 parents f68d621 + 6298d9b commit 395c5a0

File tree

9 files changed

+24
-30
lines changed

9 files changed

+24
-30
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Contributing
7575
============
7676

7777
Contributions are welcome! Please read our `Code of Conduct
78-
<https://github.com/adafruit/Adafruit_CircuitPython_ble/blob/master/CODE_OF_CONDUCT.md>`_
78+
<https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect/blob/master/CODE_OF_CONDUCT.md>`_
7979
before contributing to help this project stay welcoming.
8080

8181
Documentation

adafruit_bluefruit_connect/__init__.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,13 @@
2323
`adafruit_bluefruit_connect`
2424
============================
2525
26-
This module helps you to communicate with the Adafruit Bluefruit Connect app or use its protocols.
26+
This module helps you to communicate with the `Adafruit Bluefruit Connect App
27+
<https://learn.adafruit.com/bluefruit-le-connect>`_ or use its protocols with
28+
boards that run `Adafruit CircuitPython firmware
29+
<https://circuitpython.org/downloads>`_.
2730
2831
* Author(s): Dan Halbert for Adafruit Industries
2932
30-
Implementation Notes
31-
--------------------
32-
33-
**Hardware:**
34-
35-
Adafruit Feather nRF52840 Express <https://www.adafruit.com/product/4062>
36-
37-
**Software and Dependencies:**
38-
39-
* Adafruit Bluefruit LE Connect App
40-
https://learn.adafruit.com/bluefruit-le-connect-for-ios (also available for Android)
41-
* Adafruit CircuitPython firmware for the supported boards:
42-
https://github.com/adafruit/circuitpython/releases
43-
4433
"""
4534

4635
# imports

adafruit_bluefruit_connect/_xyz_packet.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ class _XYZPacket(Packet):
4444
# _TYPE_HEADER is set by each concrete subclass.
4545

4646
def __init__(self, x, y, z):
47-
"""Construct an _XYZPacket subclass object
48-
from the given x, y, and z float values, and type character.
49-
"""
47+
# Construct an _XYZPacket subclass object
48+
# from the given x, y, and z float values, and type character.
5049
self._x = x
5150
self._y = y
5251
self._z = z

adafruit_bluefruit_connect/button_packet.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def __init__(self, button, pressed):
6666
"""Construct a ButtonPacket from a button name and the button's state.
6767
6868
:param str button: a single character denoting the button
69-
:param bool pressed: ``True`` if button is pressed; ``False`` if it is release.
69+
:param bool pressed: ``True`` if button is pressed; ``False`` if it is
70+
released.
7071
"""
7172
# This check will catch wrong length and also non-sequence args (like an int).
7273
try:
@@ -100,12 +101,13 @@ def to_bytes(self):
100101

101102
@property
102103
def button(self):
103-
"""A single character string (not bytes) specifying the button."""
104+
"""A single character string (not bytes) specifying the button that
105+
the user pressed or released."""
104106
return self._button
105107

106108
@property
107109
def pressed(self):
108-
"""True if button is pressed."""
110+
"""``True`` if button is pressed, or ``False`` if it is released."""
109111
return self._pressed
110112

111113

adafruit_bluefruit_connect/color_packet.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ class ColorPacket(Packet):
4444
_TYPE_HEADER = b"!C"
4545

4646
def __init__(self, color):
47-
"""Construct a ColorPacket from a 3-tuple of RGB values,
48-
or from an int color value 0xRRGGBB.
47+
"""Construct a ColorPacket from a 3-element :class:`tuple` of RGB
48+
values, or from an int color value 0xRRGGBB.
4949
50-
:param tuple/int color: an RGB tuple ``(red, green, blue)``
50+
:param tuple/int color: an RGB :class:`tuple` ``(red, green, blue)``
5151
or an int color value ``0xRRGGBB``
5252
"""
5353
if isinstance(color, int):
@@ -75,7 +75,8 @@ def to_bytes(self):
7575

7676
@property
7777
def color(self):
78-
"""A tuple(red, green blue)."""
78+
"""A :class:`tuple` ``(red, green blue)`` representing the color the
79+
user chose in the BlueFruit Connect app."""
7980
return self._color
8081

8182

adafruit_bluefruit_connect/packet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class Packet:
3939
- '!' - The first byte is always an exclamation point.
4040
- *type* - A single byte designating the type of packet: b'A', b'B', etc.
4141
- *data ...* - Multiple bytes of data, varying by packet type.
42-
- *checksum* - A single byte checksum, computed by adding up all the data bytes and
43-
inverting the sum.
42+
- *checksum* - A single byte checksum, computed by adding up all the data
43+
bytes and inverting the sum.
4444
4545
This is an abstract class.
4646
"""

adafruit_bluefruit_connect/quaternion_packet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535

3636

3737
class QuaternionPacket(_XYZPacket):
38-
"""A packet of x, y, z float values. Used for several different Bluefruit controller packets."""
38+
"""Device Motion data to describe device attitude. This data is derived
39+
from Accelerometer, Gyro, and Magnetometer readings."""
3940

4041
# Use _XYZPacket to handle x, y, z, and add w.
4142

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
"CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
3030
}
3131

32+
autoclass_content = "both"
33+
3234
# Add any paths that contain templates here, relative to this directory.
3335
templates_path = ["_templates"]
3436

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Table of Contents
2929
.. toctree::
3030
:caption: Other Links
3131

32-
Download <https://github.com/adafruit/adafruit_CircuitPython_ble/releases/latest>
32+
Download <https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect/releases/latest>
3333
CircuitPython Reference Documentation <https://circuitpython.readthedocs.io>
3434
CircuitPython Support Forum <https://forums.adafruit.com/viewforum.php?f=60>
3535
Discord Chat <https://adafru.it/discord>

0 commit comments

Comments
 (0)