mirror of
https://github.com/modelec/GameController.git
synced 2026-01-19 17:17:36 +01:00
auto
This commit is contained in:
@@ -45,7 +45,7 @@ void GameControllerHandler::handleMessage(const std::string &message) {
|
||||
|
||||
if (distance <= 100) {
|
||||
strength = 0xFFFF;
|
||||
} else if (distance <= 300) {
|
||||
} else if (distance <= this->lidarDectectionDistance / 2) {
|
||||
double factor = 1 - Modelec::mapValue(distance, 100.0, this->lidarDectectionDistance, 0.0, 1.0);
|
||||
strength = static_cast<Uint16>(factor * 0xFFFF);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user