Skip to content

Fix documentation #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions adafruit_lidarlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,20 @@
class LIDARLite:
"""
A driver for the Garmin LIDAR Lite laser distance sensor.

Initialize the hardware for the LIDAR over I2C. You can pass in an
optional reset_pin for when you call reset(). There are a few common
configurations Garmin suggests: CONFIG_DEFAULT, CONFIG_SHORTFAST,
CONFIG_DEFAULTFAST, CONFIG_MAXRANGE, CONFIG_HIGHSENSITIVE, and
CONFIG_LOWSENSITIVE. For the I2C address, the default is 0x62 but if you
pass a different number in, we'll try to change the address so multiple
LIDARs can be connected. (Note all but one need to be in reset for this
to work!)

:param i2c_bus: The `busio.I2C` object to use. This is the only
required parameter.
:param int address: (optional) The I2C address of the device to set after initialization.
required parameter.
:param int address: (optional) The I2C address of the device to set
after initialization.
"""

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