mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +08:00
precland: fix landing target pose validity checking
In precland the copter may switch to horizontal approach state with an old landing target pose message.
This commit is contained in:
committed by
Kabir Mohammed
parent
036b59f3de
commit
86d3603e2d
@@ -477,7 +477,7 @@ bool PrecLand::check_state_conditions(PrecLandState state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we're trying to switch to this state, the target needs to be visible
|
// If we're trying to switch to this state, the target needs to be visible
|
||||||
return _target_pose_updated && _target_pose.abs_pos_valid;
|
return _target_pose_updated && _target_pose_valid && _target_pose.abs_pos_valid;
|
||||||
|
|
||||||
case PrecLandState::DescendAboveTarget:
|
case PrecLandState::DescendAboveTarget:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user