From c3d73935a666ba49592df782520b193be2ae1cd6 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Sat, 26 Jun 2021 10:04:00 +0200 Subject: [PATCH] ball: correctly detect when the ball is not present --- src/sensors/data_source_ball.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sensors/data_source_ball.cpp b/src/sensors/data_source_ball.cpp index 888a9c6..a568e3c 100644 --- a/src/sensors/data_source_ball.cpp +++ b/src/sensors/data_source_ball.cpp @@ -45,7 +45,7 @@ void DataSourceBall :: postProcess(){ distance = ballDist_str.toInt(); // Invalid data if out of parameters - if(angle < 0 || angle >= 360 || distance < 0 || distance > 250) valid_data = false; + if(angle < 0 || angle >= 360 || distance < 0 || distance > 255) valid_data = false; } }