FW pos control: fix airspeed input constaining

This commit is contained in:
Pieter-Jan Dewitte 2021-06-18 11:52:53 +02:00 committed by Mathieu Bresciani
parent b1829e5766
commit 155d3c7d36

View File

@ -254,7 +254,7 @@ FixedwingPositionControl::manual_control_setpoint_poll()
* demanding up/down with the throttle stick, and move faster/break with the pitch one.
*/
_manual_control_setpoint_altitude = -(math::constrain(_manual_control_setpoint.z, 0.0f, 1.0f) * 2.f - 1.f);
_manual_control_setpoint_airspeed = math::constrain(_manual_control_setpoint.x, 0.0f, 1.0f) / 2.f + 0.5f;
_manual_control_setpoint_airspeed = math::constrain(_manual_control_setpoint.x, -1.0f, 1.0f) / 2.f + 0.5f;
}
}