From 7f61ce55d35c1244ad569cf9b8e1cf3f81a4ae4c Mon Sep 17 00:00:00 2001 From: ackimixs Date: Tue, 28 May 2024 18:21:29 +0200 Subject: [PATCH] detection range --- GameControllerHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameControllerHandler.cpp b/GameControllerHandler.cpp index da880ff..3902629 100644 --- a/GameControllerHandler.cpp +++ b/GameControllerHandler.cpp @@ -48,7 +48,7 @@ void GameControllerHandler::handleMessage(const std::string &message) { if (distance <= 100) { strength = 0xFFFF; } else if (distance <= 400) { - double factor = 1 - Modelec::mapValue(distance, 200.0, this->lidarDectectionDistance, 0.0, 1.0); + double factor = 1 - Modelec::mapValue(distance, 100.0, this->lidarDectectionDistance, 0.0, 1.0); strength = static_cast(factor * 0xFFFF); } else { strength = 0;