mission_block: always accept yaw in MC takeoff

This commit is contained in:
Alessandro Simovic
2021-11-16 08:04:35 +01:00
committed by Daniel Agar
parent 0622cb8857
commit 7090e634cc
+8
View File
@@ -343,6 +343,14 @@ MissionBlock::is_mission_item_reached()
_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 (!_waypoint_yaw_reached && _mission_item.force_heading &&
(_navigator->get_yaw_timeout() >= FLT_EPSILON) &&