From 63c384e7237d909ab5658a1533116eec11cb58d8 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Wed, 22 May 2024 13:16:11 +0200 Subject: [PATCH] distance --- GameControllerHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameControllerHandler.cpp b/GameControllerHandler.cpp index 6e814eb..c19e3a0 100644 --- a/GameControllerHandler.cpp +++ b/GameControllerHandler.cpp @@ -45,7 +45,7 @@ void GameControllerHandler::handleMessage(const std::string &message) { if (distance <= 100) { strength = 0xFFFF; - } else if (distance <= 500) { + } else if (distance <= 300) { double factor = 1 - Modelec::mapValue(distance, 100.0, this->lidarDectectionDistance, 0.0, 1.0); strength = static_cast(factor * 0xFFFF); } else {