This commit is contained in:
ackimixs
2024-05-28 20:23:10 +02:00
parent dff61ba537
commit 09f747fdef
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ void GameControllerHandler::handleMessage(const std::string &message) {
if (distance <= 100) {
strength = 0xFFFF;
} else if (distance <= 300) {
} else if (distance <= 500) {
double factor = 1 - Modelec::mapValue(distance, 100.0, this->lidarDectectionDistance, 0.0, 1.0);
strength = static_cast<Uint16>(factor * 0xFFFF);
} else {

View File

@@ -27,7 +27,7 @@ public:
private:
SDL_GameController* controller;
double lidarDectectionDistance = 300;
double lidarDectectionDistance = 500;
bool rumble = true;