@ -74,6 +74,18 @@ bool FlightTaskManualAcceleration::update()
@@ -74,6 +74,18 @@ bool FlightTaskManualAcceleration::update()
_stick_acceleration_xy . getSetpoints ( _position_setpoint , _velocity_setpoint , _acceleration_setpoint ) ;
_constraints . want_takeoff = _checkTakeoff ( ) ;
// check if an external yaw handler is active and if yes, let it update the yaw setpoints
if ( _weathervane_yaw_handler & & _weathervane_yaw_handler - > is_active ( ) ) {
_yaw_setpoint = NAN ;
// only enable the weathervane to change the yawrate when position lock is active (and thus the pos. sp. are NAN)
if ( PX4_ISFINITE ( _position_setpoint ( 0 ) ) & & PX4_ISFINITE ( _position_setpoint ( 1 ) ) ) {
// vehicle is steady
_yawspeed_setpoint + = _weathervane_yaw_handler - > get_weathervane_yawrate ( ) ;
}
}
return ret ;
}