From ab5d01d09a1d83a542932bf1b08b351adc2c5014 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Thu, 16 May 2024 09:17:22 +0200 Subject: [PATCH] lidar detection range --- GameControllerHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameControllerHandler.h b/GameControllerHandler.h index 5ae0ddb..0bf59e0 100644 --- a/GameControllerHandler.h +++ b/GameControllerHandler.h @@ -47,7 +47,7 @@ public: if (distance <= 100) { strength = 0xFFFF; } else if (distance <= 500) { - double factor = 1 - Utils::mapValue(distance, 100.0, 500.0, 0.0, 1.0); + double factor = 1 - Utils::mapValue(distance, 100.0, 750.0, 0.0, 1.0); strength = static_cast(factor * 0xFFFF); } else { strength = 0;