mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +08:00
mission_block: always accept yaw in MC takeoff
This commit is contained in:
committed by
Daniel Agar
parent
0622cb8857
commit
7090e634cc
@@ -343,6 +343,14 @@ MissionBlock::is_mission_item_reached()
|
|||||||
_waypoint_yaw_reached = true;
|
_waypoint_yaw_reached = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always accept yaw during takeoff
|
||||||
|
// TODO: Ideally Navigator would handle a yaw reset and adjust its yaw setpoint, making the
|
||||||
|
// following no longer necessary.
|
||||||
|
// FlightTaskAuto is currently also ignoring the yaw setpoint during takeoff and thus "handling" it.
|
||||||
|
if (_mission_item.nav_cmd == vehicle_command_s::VEHICLE_CMD_NAV_TAKEOFF) {
|
||||||
|
_waypoint_yaw_reached = true;
|
||||||
|
}
|
||||||
|
|
||||||
/* if heading needs to be reached, the timeout is enabled and we don't make it, abort mission */
|
/* if heading needs to be reached, the timeout is enabled and we don't make it, abort mission */
|
||||||
if (!_waypoint_yaw_reached && _mission_item.force_heading &&
|
if (!_waypoint_yaw_reached && _mission_item.force_heading &&
|
||||||
(_navigator->get_yaw_timeout() >= FLT_EPSILON) &&
|
(_navigator->get_yaw_timeout() >= FLT_EPSILON) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user