Skip to content
Snippets Groups Projects
Commit fc4fa169 authored by Dennis Mannhart's avatar Dennis Mannhart Committed by Lorenz Meier
Browse files

FlightTaskManualStabilized: valid yaw is required

parent 2af253fa
No related branches found
No related tags found
No related merge requests found
......@@ -62,13 +62,16 @@ bool FlightTaskManualStabilized::activate()
_yaw_setpoint = _yaw;
_yawspeed_setpoint = 0.0f;
_constraints.tilt = math::radians(_tilt_max_man.get());
// need a valid yaw
ret = ret && PX4_ISFINITE(_yaw);
return ret;
}
bool FlightTaskManualStabilized::updateInitialize()
{
bool ret = FlightTaskManual::updateInitialize();
// need a valid yaw-state
return ret && PX4_ISFINITE(_yaw);
}
void FlightTaskManualStabilized::_scaleSticks()
{
/* Scale sticks to yaw and thrust using
......
......@@ -50,6 +50,7 @@ public:
virtual ~FlightTaskManualStabilized() = default;
bool activate() override;
bool updateInitialize() override;
bool update() override;
bool initializeSubscriptions(SubscriptionArray &subscription_array) override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment