Skip to content

Commit 7bfb965

Browse files
authored
Merge pull request #18 from Neradoc/fix-documentation
Fix documentation
2 parents 81a9164 + afb4078 commit 7bfb965

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

adafruit_lidarlite.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,20 @@
7070
class LIDARLite:
7171
"""
7272
A driver for the Garmin LIDAR Lite laser distance sensor.
73+
74+
Initialize the hardware for the LIDAR over I2C. You can pass in an
75+
optional reset_pin for when you call reset(). There are a few common
76+
configurations Garmin suggests: CONFIG_DEFAULT, CONFIG_SHORTFAST,
77+
CONFIG_DEFAULTFAST, CONFIG_MAXRANGE, CONFIG_HIGHSENSITIVE, and
78+
CONFIG_LOWSENSITIVE. For the I2C address, the default is 0x62 but if you
79+
pass a different number in, we'll try to change the address so multiple
80+
LIDARs can be connected. (Note all but one need to be in reset for this
81+
to work!)
82+
7383
:param i2c_bus: The `busio.I2C` object to use. This is the only
74-
required parameter.
75-
:param int address: (optional) The I2C address of the device to set after initialization.
84+
required parameter.
85+
:param int address: (optional) The I2C address of the device to set
86+
after initialization.
7687
"""
7788

7889
def __init__(
@@ -83,14 +94,6 @@ def __init__(
8394
configuration=CONFIG_DEFAULT,
8495
address=_ADDR_DEFAULT
8596
):
86-
"""Initialize the hardware for the LIDAR over I2C. You can pass in an
87-
optional reset_pin for when you call reset(). There are a few common
88-
configurations Garmin suggests: CONFIG_DEFAULT, CONFIG_SHORTFAST,
89-
CONFIG_DEFAULTFAST, CONFIG_MAXRANGE, CONFIG_HIGHSENSITIVE, and
90-
CONFIG_LOWSENSITIVE. For the I2C address, the default is 0x62 but if you
91-
pass a different number in, we'll try to change the address so multiple
92-
LIDARs can be connected. (Note all but one need to be in reset for this
93-
to work!)"""
9497
self.i2c_device = I2CDevice(i2c_bus, address)
9598
self._buf = bytearray(2)
9699
self._bias_count = 0

0 commit comments

Comments
 (0)