Browse Source

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.
QGC4.4
Rustom Jehangir 9 years ago
parent
commit
1ed336ff48
  1. 5
      src/VehicleSetup/JoystickConfigController.cc

5
src/VehicleSetup/JoystickConfigController.cc

@ -386,11 +386,6 @@ void JoystickConfigController::_inputStickMin(Joystick::AxisFunction_t function, @@ -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;

Loading…
Cancel
Save