Skip to content
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
2 changes: 1 addition & 1 deletion adafruit_vl53l1x.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def timing_budget(self, val):
reg_vals = TB_LONG_DIST
if reg_vals is None:
raise RuntimeError("Unknown distance mode.")
if val not in reg_vals.keys():
if val not in reg_vals:
raise ValueError("Invalid timing budget.")
self._write_register(_RANGE_CONFIG__TIMEOUT_MACROP_A_HI, reg_vals[val][0])
self._write_register(_RANGE_CONFIG__TIMEOUT_MACROP_B_HI, reg_vals[val][1])
Expand Down