diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index e5abd1445161a096413a1d5ad7f6c8fb9c62e0a3..e5aa66495c73d478763184de2c1a8900fccdbacf 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -239,7 +239,7 @@ float Joystick::_adjustRange(int value, Calibration_t calibration) << axisLength; #endif - return correctedValue; + return std::max(-1.0f, std::min(correctedValue, 1.0f)); }