From 1ed336ff48b5776ab5476272cbac91a367d59027 Mon Sep 17 00:00:00 2001 From: Rustom Jehangir Date: Fri, 15 Jan 2016 19:58:02 -0800 Subject: [PATCH] Joystick: Fix throttle center point. The lines removed set the center point of the throttle axis to one extreme of the joystick range. This causes an offset value when the stick is centered if the joystick does not return exactly zero. This is important for vehicles with reversible throttle, such as ground robots or boats. --- src/VehicleSetup/JoystickConfigController.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/VehicleSetup/JoystickConfigController.cc b/src/VehicleSetup/JoystickConfigController.cc index 102603090..f668a7a64 100644 --- a/src/VehicleSetup/JoystickConfigController.cc +++ b/src/VehicleSetup/JoystickConfigController.cc @@ -386,11 +386,6 @@ void JoystickConfigController::_inputStickMin(Joystick::AxisFunction_t function, } else { _rgAxisInfo[axis].axisMin = value; } - - // Check if this is throttle and set trim accordingly - if (function == Joystick::throttleFunction) { - _rgAxisInfo[axis].axisTrim = value; - } qCDebug(JoystickConfigControllerLog) << "_inputStickMin saving values, function:axis:value:reversed" << function << axis << value << info->reversed; -- 2.22.0