Update kuukar_sensors.py

This commit is contained in:
Siwat Sirichai 2022-12-08 19:55:51 +07:00
parent ac470b75f2
commit c6c33b24c7
1 changed files with 1 additions and 1 deletions

View File

@ -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