From ab14cb0581a9e43c0bad3615966b8637abe02684 Mon Sep 17 00:00:00 2001 From: HUIN Nicolas <nicolas.huin@imt-atlantique.fr> Date: Tue, 24 Jan 2023 10:27:28 +0000 Subject: [PATCH] Update controller.py --- controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller.py b/controller.py index 0ff8b88..c91e4fd 100644 --- a/controller.py +++ b/controller.py @@ -134,9 +134,9 @@ class Controller: :param bool moving: Indicates if the robot is moving """ distance = self._get_robust_distance(sensor, moving) - if distance < sensor.low: + if distance < sensor.sensor.low: return (HCSR04Event.DANGER, distance) - if distance < sensor.high: + if distance < sensor.sensor.high: return (HCSR04Event.WALL, distance) return (HCSR04Event.NOTHING, distance) -- GitLab