Skip to content

Commit e35e365

Browse files
authored
Merge pull request #11 from FoamyGuy/improve_docs
Show info about resolution and mode in docs
2 parents 9e4983b + 5c9cfbd commit e35e365

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

adafruit_bh1750.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def __set__(self, obj: "BH1750", value: int) -> None:
123123

124124

125125
class Mode(CV):
126-
"""Options for ``mode``"""
126+
"""Options for `mode`. Valid values are ``SHUTDOWN``, ``CONTINUOUS``, and ``ONE_SHOT``"""
127127

128128
pass # pylint: disable=unnecessary-pass
129129

@@ -138,7 +138,7 @@ class Mode(CV):
138138

139139

140140
class Resolution(CV):
141-
"""Options for ``resolution``"""
141+
"""Options for `resolution` Valid values are ``LOW``, ``MID``, and ``HIGH``"""
142142

143143
pass # pylint: disable=unnecessary-pass
144144

@@ -186,7 +186,11 @@ class BH1750: # pylint:disable=too-many-instance-attributes
186186
"""
187187

188188
mode = RWBitfields(2, 4)
189+
"""The capture mode for the sensor. See `Mode` for valid values."""
190+
189191
resolution = RWBitfields(2, 0)
192+
"""The resolution of the sensor. See `Resolution` for valid values."""
193+
""""""
190194

191195
def __init__(self, i2c: I2C, address: int = _BH1750_DEFAULT_ADDRESS) -> None:
192196
self.i2c_device = i2c_device.I2CDevice(i2c, address)

docs/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
77
.. automodule:: adafruit_bh1750
88
:members:
9-
:exclude-members: CV, Resolution, Mode, RWBitfields
9+
:exclude-members: CV, RWBitfields

0 commit comments

Comments
 (0)