We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d63def7 + 5426fe9 commit bcef471Copy full SHA for bcef471
picozero/picozero.py
@@ -1903,7 +1903,7 @@ class DistanceSensor(PinsMixin):
1903
close to measure) and 1 (maximum distance). This parameter specifies
1904
the maximum distance expected in meters. This defaults to 1.
1905
"""
1906
- def __init__(self, echo, trigger, max_distance=1):
+ def __init__(self, echo, trigger, max_distance=1.0):
1907
self._pin_nums = (echo, trigger)
1908
self._max_distance = max_distance
1909
self._echo = Pin(echo, mode=Pin.IN, pull=Pin.PULL_DOWN)
0 commit comments