mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 11:30:36 +08:00
FlightTaskManualAltitude: use StickTiltXY for horizontal stick mapping
This commit is contained in:
@@ -240,7 +240,7 @@ void FlightTaskAuto::_prepareLandSetpoints()
|
||||
// User input assisted landing
|
||||
if (_param_mpc_land_rc_help.get() && _sticks.checkAndUpdateStickInputs()) {
|
||||
// Stick full up -1 -> stop, stick full down 1 -> double the speed
|
||||
vertical_speed *= (1 + _sticks.getPositionExpo()(2));
|
||||
vertical_speed *= (1 - _sticks.getThrottleZeroCenteredExpo());
|
||||
|
||||
// Only set a yawrate setpoint if weather vane is not active or the yaw stick is out of its dead-zone
|
||||
if (!_weathervane.isActive() || fabsf(_sticks.getYawExpo()) > FLT_EPSILON) {
|
||||
@@ -248,7 +248,7 @@ void FlightTaskAuto::_prepareLandSetpoints()
|
||||
_deltatime);
|
||||
}
|
||||
|
||||
_stick_acceleration_xy.generateSetpoints(_sticks.getPositionExpo().slice<2, 1>(0, 0), _yaw, _land_heading, _position,
|
||||
_stick_acceleration_xy.generateSetpoints(_sticks.getPitchRollExpo(), _yaw, _land_heading, _position,
|
||||
_velocity_setpoint_feedback.xy(), _deltatime);
|
||||
_stick_acceleration_xy.getSetpoints(_land_position, _velocity_setpoint, _acceleration_setpoint);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user