Skip to content

The code in init sets the timing budget to 50 #14

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
Dec 12, 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
5 changes: 3 additions & 2 deletions adafruit_vl53l1x.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def timing_budget(self):
"""Ranging duration in milliseconds. Increasing the timing budget
increases the maximum distance the device can range and improves
the repeatability error. However, average power consumption augments
accordingly. ms = 15 (short mode only), 20, 33, 50, 100, 200, 500."""
accordingly. ms = 15 (short mode only), 20, 33, 50, 100, 200, 500.
Defaults to 50."""
return self._timing_budget

@timing_budget.setter
Expand All @@ -264,7 +265,7 @@ def _interrupt_polarity(self):

@property
def distance_mode(self):
"""The distance mode. 1=short, 2=long."""
"""The distance mode. 1=short (up to 136cm) , 2=long (up to 360cm)."""
mode = self._read_register(_PHASECAL_CONFIG__TIMEOUT_MACROP)[0]
if mode == 0x14:
return 1 # short distance
Expand Down