mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Only set virtual waypoint for VTOL_TAKEOFF. Fixes #4193
This commit is contained in:
@@ -336,7 +336,8 @@ MissionBlock::mission_item_to_position_setpoint(const struct mission_item_s *ite
|
||||
{
|
||||
/* 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;
|
||||
waypoint_from_heading_and_distance(_navigator->get_global_position()->lat,
|
||||
_navigator->get_global_position()->lon,
|
||||
|
||||
Reference in New Issue
Block a user