Skip to content

Commit b2b827f

Browse files
authored
Merge pull request #77 from Neradoc/fix-missing-docs
Add missing submodules to the docs
2 parents 1f85b59 + 0879976 commit b2b827f

File tree

9 files changed

+61
-52
lines changed

9 files changed

+61
-52
lines changed

adafruit_featherwing/ina219_featherwing.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
99
Helper for using the `INA219 FeatherWing <https://www.adafruit.com/product/3650>`_.
1010
11+
.. image :: ../docs/_static/ina219_featherwing/ina219_featherwing.jpg
12+
:alt: INA219 Featherwing
13+
1114
* Author(s): Kattni Rembor
1215
"""
1316

@@ -39,9 +42,6 @@ def __init__(self, i2c: Optional[I2C] = None):
3942
def bus_voltage(self):
4043
"""Bus voltage returns volts.
4144
42-
.. image :: ../docs/_static/ina219_featherwing/ina219_featherwing.jpg
43-
:alt: INA219 Featherwing
44-
4545
This example prints the bus voltage with the appropriate units.
4646
4747
.. code-block:: python
@@ -62,9 +62,6 @@ def bus_voltage(self):
6262
def shunt_voltage(self):
6363
"""Shunt voltage returns volts.
6464
65-
.. image :: ../docs/_static/ina219_featherwing/ina219_featherwing.jpg
66-
:alt: INA219 Featherwing
67-
6865
This example prints the shunt voltage with the appropriate units.
6966
7067
.. code-block:: python
@@ -85,9 +82,6 @@ def shunt_voltage(self):
8582
def voltage(self):
8683
"""Voltage, known as load voltage, is bus voltage plus shunt voltage. Returns volts.
8784
88-
.. image :: ../docs/_static/ina219_featherwing/ina219_featherwing.jpg
89-
:alt: INA219 Featherwing
90-
9185
This example prints the voltage with the appropriate units.
9286
9387
.. code-block:: python
@@ -109,9 +103,6 @@ def voltage(self):
109103
def current(self):
110104
"""Current returns mA.
111105
112-
.. image :: ../docs/_static/ina219_featherwing/ina219_featherwing.jpg
113-
:alt: INA219 Featherwing
114-
115106
This example prints the current with the appropriate units.
116107
117108
.. code-block:: python

adafruit_featherwing/joy_featherwing.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ def _check_button(self, button: int) -> bool:
173173
def joystick_offset(self):
174174
"""Offset used to correctly report (0, 0) when the joystick is centered.
175175
176-
.. image :: ../docs/_static/joy_featherwing/joy_featherwing_joystick.jpg
177-
:alt: Joy FeatherWing Joystick
178-
179176
Provide a tuple of (x, y) to set your joystick center to (0, 0).
180177
The offset you provide is subtracted from the current reading.
181178
For example, if your joystick reads as (-4, 0), you would enter
@@ -215,9 +212,6 @@ def zero_joystick(self):
215212
Note: You must not be touching the joystick at the time of zeroing
216213
for it to be accurate.
217214
218-
.. image :: ../docs/_static/joy_featherwing/joy_featherwing_joystick.jpg
219-
:alt: Joy FeatherWing Joystick
220-
221215
This example zeros the joystick, and prints the coordinates of
222216
joystick when it is moved.
223217

adafruit_featherwing/keyboard_featherwing.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
`adafruit_featherwing.keyboard_featherwing`
77
====================================================
88
9-
Helper for using the `Keyboard Featherwing`
9+
Helper for using the `Keyboard Featherwing
1010
<https://www.tindie.com/products/arturo182/keyboard-featherwing-qwerty-keyboard-26-lcd/>`_.
1111
1212
* Author(s): Foamyguy
@@ -38,9 +38,8 @@
3838

3939

4040
class KeyboardFeatherwing(TFTFeatherWing):
41-
"""Class representing a `Keyboard Featherwing`
41+
"""Class representing a `Keyboard Featherwing
4242
<https://www.tindie.com/products/arturo182/keyboard-featherwing-qwerty-keyboard-26-lcd/>`_.
43-
4443
"""
4544

4645
def __init__(
@@ -64,4 +63,6 @@ def __init__(
6463
self._display_bus, width=320, height=240
6564
)
6665
self.neopixel = neopixel.NeoPixel(neopixel_pin, 1)
66+
"""Status NeoPixel."""
6767
self.keyboard = BBQ10Keyboard(i2c)
68+
"""BBQ10Keyboard instance."""

adafruit_featherwing/led_segments.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
`adafruit_featherwing.led_segments`
77
====================================================
88
9-
Base Class for the AlphaNumeric FeatherWing and 7-Segment FeatherWing helpers_.
9+
Base Class for the AlphaNumeric FeatherWing and 7-Segment FeatherWing helpers.
1010
1111
* Author(s): Melissa LeBlanc-Williams
1212
"""
@@ -23,10 +23,7 @@
2323

2424

2525
class Segments:
26-
"""Class representing an `Adafruit 14-segment AlphaNumeric FeatherWing
27-
<https://www.adafruit.com/product/3139>`_.
28-
29-
Automatically uses the feather's I2C bus."""
26+
"""Base Class for the AlphaNumeric FeatherWing and 7-Segment FeatherWing helpers."""
3027

3128
def __init__(self):
3229
self._segments = None

adafruit_featherwing/tft_featherwing.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333

3434
# pylint: disable-msg=too-few-public-methods, too-many-arguments
3535
class TFTFeatherWing:
36-
"""Class representing an `TFT FeatherWing 2.4
37-
<https://www.adafruit.com/product/3315>`_.
38-
39-
"""
36+
"""Base class for TFT FeatherWings."""
4037

4138
def __init__(
4239
self,
@@ -71,6 +68,8 @@ def __init__(
7168
except OSError as error:
7269
print("No SD card found:", error)
7370

71+
self.touchscreen = None
72+
"""Controller for the resistive touchscreen."""
7473
try:
7574
# the screen might not be ready from cold boot
7675
time.sleep(0.8)

adafruit_featherwing/tft_featherwing_24.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
`adafruit_featherwing.tft_featherwing_24`
88
====================================================
99
10-
Helper for using the `TFT FeatherWing 2.4"`
10+
Helper for using the `TFT FeatherWing 2.4"
1111
<https://www.adafruit.com/product/3315>`_.
1212
1313
* Author(s): Melissa LeBlanc-Williams, Foamyguy
@@ -35,7 +35,7 @@
3535
class TFTFeatherWing24(TFTFeatherWing):
3636
"""Class representing an `TFT FeatherWing 2.4
3737
<https://www.adafruit.com/product/3315>`_.
38-
38+
Attempts to mount the SD card to /sd.
3939
"""
4040

4141
def __init__(
@@ -50,3 +50,4 @@ def __init__(
5050
self.display = adafruit_ili9341.ILI9341(
5151
self._display_bus, width=320, height=240
5252
)
53+
"""Display object for the FeatherWing's screen."""

adafruit_featherwing/tft_featherwing_35.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
`adafruit_featherwing.tft_featherwing_35`
88
====================================================
99
10-
Helper for using the `TFT FeatherWing 3.5"`
10+
Helper for using the `TFT FeatherWing 3.5"
1111
<https://www.adafruit.com/product/3651>`_.
1212
1313
* Author(s): Melissa LeBlanc-Williams, Foamyguy
@@ -33,9 +33,9 @@
3333

3434
# pylint: disable-msg=too-few-public-methods, too-many-arguments
3535
class TFTFeatherWing35(TFTFeatherWing):
36-
"""Class representing an `TFT FeatherWing 3.5
36+
"""Class representing a `TFT FeatherWing 3.5
3737
<https://www.adafruit.com/product/3651>`_.
38-
38+
Attempts to mount the SD card to /sd.
3939
"""
4040

4141
def __init__(
@@ -48,3 +48,4 @@ def __init__(
4848
):
4949
super().__init__(spi, cs, dc, ts_cs, sd_cs)
5050
self.display = HX8357(self._display_bus, width=480, height=320)
51+
"""Display object for the FeatherWing's screen."""

docs/api.rst

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,51 @@
11

22
.. If you created a package, create one automodule per module in the package.
33
4+
.. automodule:: adafruit_featherwing.alphanum_featherwing
5+
:inherited-members:
6+
:members:
7+
8+
.. automodule:: adafruit_featherwing.dotstar_featherwing
9+
:inherited-members:
10+
:members:
11+
12+
.. automodule:: adafruit_featherwing.gps_featherwing
13+
:members:
14+
415
.. automodule:: adafruit_featherwing.ina219_featherwing
5-
:members:
16+
:members:
617

718
.. automodule:: adafruit_featherwing.joy_featherwing
8-
:members:
19+
:members:
920

10-
.. automodule:: adafruit_featherwing.alphanum_featherwing
11-
:members:
21+
.. automodule:: adafruit_featherwing.keyboard_featherwing
22+
:inherited-members:
23+
:members:
1224

13-
.. automodule:: adafruit_featherwing.dotstar_featherwing
14-
:members:
25+
.. automodule:: adafruit_featherwing.matrix_featherwing
26+
:members:
27+
28+
.. automodule:: adafruit_featherwing.minitft_featherwing
29+
:members:
1530

1631
.. automodule:: adafruit_featherwing.neopixel_featherwing
17-
:members:
32+
:inherited-members:
33+
:members:
1834

1935
.. automodule:: adafruit_featherwing.rtc_featherwing
20-
:members:
36+
:members:
2137

22-
.. automodule:: adafruit_featherwing.gps_featherwing
23-
:members:
38+
.. automodule:: adafruit_featherwing.sevensegment_featherwing
39+
:inherited-members:
40+
:members:
2441

25-
.. automodule:: adafruit_featherwing.matrix_featherwing
26-
:members:
42+
.. automodule:: adafruit_featherwing.tempmotion_featherwing
43+
:members:
2744

28-
.. automodule:: adafruit_featherwing.minitft_featherwing
29-
:members:
45+
.. automodule:: adafruit_featherwing.tft_featherwing_24
46+
:inherited-members:
47+
:members:
3048

31-
.. automodule:: adafruit_featherwing.tempmotion_featherwing
32-
:members:
49+
.. automodule:: adafruit_featherwing.tft_featherwing_35
50+
:inherited-members:
51+
:members:

docs/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@
2323
# Uncomment the below if you use native CircuitPython modules such as
2424
# digitalio, micropython and busio. List the modules you use. Without it, the
2525
# autodoc module docs will fail to generate with a warning.
26-
autodoc_mock_imports = ["board", "busio"]
26+
autodoc_mock_imports = [
27+
"board",
28+
"busio",
29+
"bbq10keyboard",
30+
"sdcardio",
31+
"storage",
32+
]
2733

2834
intersphinx_mapping = {
2935
"python": ("https://docs.python.org/3", None),

0 commit comments

Comments
 (0)