From 9a99a1f8a6d47beb8508ff0503c6c5201c291d97 Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Sat, 28 Oct 2023 11:31:13 -0400 Subject: [PATCH] Adjust thresholds --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index da47a14..47274be 100644 --- a/main.py +++ b/main.py @@ -61,12 +61,12 @@ class Marshaller(Server): if distance_in_inches < 15: self.red_led.on() - elif distance_in_inches < 20: + elif distance_in_inches < 23: self.green_led.on() self.yellow_led.on() elif distance_in_inches < 25: self.green_led.on() - elif distance_in_inches < 30: + elif distance_in_inches < 33: self.yellow_led.on() else: self.blue_led.on() @@ -80,7 +80,7 @@ class Marshaller(Server): def get_buffered_distance_in_inches(self): distance = self.get_distance_in_inches() - if abs(distance - self.last_value) > 0.5: + if abs(distance - self.last_value) > 0.25: self.last_value = distance return self.last_value