mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-06 21:54:15 +01:00
Merged in f5soh/librepilot/LP-569_PosHold_YawControl (pull request #485)
LP-569 Ignore YawControl while using PosHold, AutoTakeOff and AutoCruize Approved-by: Lalanne Laurent <f5soh@free.fr> Approved-by: Alessio Morale <alessiomorale@gmail.com> Approved-by: Philippe Renon <philippe_renon@yahoo.fr> Approved-by: Paul Jewell <paul@teulu.org>
This commit is contained in:
commit
578e7adb94
@ -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