Skip to content

Commit 96132c8

Browse files
committed
Add parameters and types to docstrings
1 parent b63af0d commit 96132c8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

adafruit_vl6180x.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@ class VL6180X:
9595
"""Create an instance of the VL6180X distance sensor. You must pass in
9696
the following parameters:
9797
98-
:param i2c: An instance of the I2C bus connected to the sensor.
98+
:param ~I2C i2c: An instance of the I2C bus connected to the sensor.
9999
100100
Optionally you can specify:
101101
102-
:param address: The I2C address of the sensor. If not specified the sensor's
102+
:param int address: The I2C address of the sensor. If not specified the sensor's
103103
default value will be assumed.
104+
:param int offset: The offset to be applied to measurements, in mm
104105
"""
105106

106107
def __init__(
@@ -168,7 +169,8 @@ def range_history_enabled(self) -> bool:
168169

169170
def start_range_continuous(self, period: int = 100) -> None:
170171
"""Start continuous range mode
171-
:param period: Time delay between measurements in ms
172+
173+
:param int period: Time delay between measurements, in milliseconds
172174
"""
173175
# Set range between measurements
174176
period_reg: int = 0
@@ -238,6 +240,8 @@ def read_lux(self, gain: int) -> float:
238240
- ALS_GAIN_10 = 10x
239241
- ALS_GAIN_20 = 20x
240242
- ALS_GAIN_40 = 40x
243+
244+
:param int gain: The gain value to use
241245
"""
242246
reg = self._read_8(_VL6180X_REG_SYSTEM_INTERRUPT_CONFIG)
243247
reg &= ~0x38

0 commit comments

Comments
 (0)