1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

LP-569 Ignore YawControl while using PosHold, AutoTakeOff and AutoCruize

This commit is contained in:
Laurent Lalanne 2017-12-17 18:53:40 +01:00
parent 213893e298
commit 5be3aad67b

View File

@ -274,7 +274,9 @@ int8_t VtolFlyController::UpdateStabilizationDesired(bool yaw_attitude, float ya
}
#endif // if 0
if (yaw_attitude) {
// Yaw Attitude will be disabled without velocity requested.
// PositionHold, AutoTakeoff or AutoCruise still using manual Yaw.
if (yaw_attitude && ((fabsf(pathDesired->StartingVelocity) > 0.0f) && (fabsf(pathDesired->EndingVelocity) > 0.0f))) {
stabDesired.StabilizationMode.Yaw = STABILIZATIONDESIRED_STABILIZATIONMODE_ATTITUDE;
stabDesired.Yaw = yaw_direction;
} else {