mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
LP-569 Ignore YawControl while using PosHold, AutoTakeOff and AutoCruize
This commit is contained in:
parent
213893e298
commit
5be3aad67b
@ -274,7 +274,9 @@ int8_t VtolFlyController::UpdateStabilizationDesired(bool yaw_attitude, float ya
|
|||||||
}
|
}
|
||||||
#endif // if 0
|
#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.StabilizationMode.Yaw = STABILIZATIONDESIRED_STABILIZATIONMODE_ATTITUDE;
|
||||||
stabDesired.Yaw = yaw_direction;
|
stabDesired.Yaw = yaw_direction;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user