From 0849084845bd0047f80bb72ff59c88c290a153ee Mon Sep 17 00:00:00 2001 From: Danny Staple Date: Sun, 11 Dec 2022 14:40:59 +0000 Subject: [PATCH] The code in init sets the timing budget to 50 This seems like a useful detail to document in the timing budget settings. Also add distance mode notes. --- adafruit_vl53l1x.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/adafruit_vl53l1x.py b/adafruit_vl53l1x.py index 58ec7ed..122a178 100644 --- a/adafruit_vl53l1x.py +++ b/adafruit_vl53l1x.py @@ -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 @@ -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