Update kuukar_sensors.py
This commit is contained in:
parent
ac470b75f2
commit
c6c33b24c7
|
@ -27,7 +27,7 @@ class sensors:
|
|||
pin = data[1]
|
||||
distance = data[2]
|
||||
sonar_id = self.__sonar_adc_pins.index(pin)
|
||||
self.__sonar_distances[sonar_id] = distance
|
||||
self.__sonar_distances[sonar_id] = round((distance-2200)/100)
|
||||
|
||||
def get_brightness_pct(self) -> float:
|
||||
return self.__brightness
|
||||
|
|
Loading…
Reference in New Issue