Skip to content
Snippets Groups Projects
Commit 7338fe88 authored by sander's avatar sander
Browse files

Only set virtual waypoint for VTOL_TAKEOFF. Fixes #4193

parent 42eff31c
No related branches found
No related tags found
No related merge requests found
...@@ -336,7 +336,8 @@ MissionBlock::mission_item_to_position_setpoint(const struct mission_item_s *ite ...@@ -336,7 +336,8 @@ MissionBlock::mission_item_to_position_setpoint(const struct mission_item_s *ite
{ {
/* set the correct setpoint for vtol transition */ /* set the correct setpoint for vtol transition */
if(item->nav_cmd == NAV_CMD_DO_VTOL_TRANSITION && PX4_ISFINITE(item->yaw)) { if(item->nav_cmd == NAV_CMD_DO_VTOL_TRANSITION && PX4_ISFINITE(item->yaw)
&& item->params[0] >= vehicle_status_s::VEHICLE_VTOL_STATE_FW - 0.5f) {
sp->type = position_setpoint_s::SETPOINT_TYPE_POSITION; sp->type = position_setpoint_s::SETPOINT_TYPE_POSITION;
waypoint_from_heading_and_distance(_navigator->get_global_position()->lat, waypoint_from_heading_and_distance(_navigator->get_global_position()->lat,
_navigator->get_global_position()->lon, _navigator->get_global_position()->lon,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment