Skip to content

Commit 5be3aad

Browse files
committed
LP-569 Ignore YawControl while using PosHold, AutoTakeOff and AutoCruize
1 parent 213893e commit 5be3aad

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

flight/modules/PathFollower/vtolflycontroller.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ int8_t VtolFlyController::UpdateStabilizationDesired(bool yaw_attitude, float ya
274274
}
275275
#endif // if 0
276276

277-
if (yaw_attitude) {
277+
// Yaw Attitude will be disabled without velocity requested.
278+
// PositionHold, AutoTakeoff or AutoCruise still using manual Yaw.
279+
if (yaw_attitude && ((fabsf(pathDesired->StartingVelocity) > 0.0f) && (fabsf(pathDesired->EndingVelocity) > 0.0f))) {
278280
stabDesired.StabilizationMode.Yaw = STABILIZATIONDESIRED_STABILIZATIONMODE_ATTITUDE;
279281
stabDesired.Yaw = yaw_direction;
280282
} else {

0 commit comments

Comments
 (0)