mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 01:53:34 +08:00
mission require valid landing after DO_LAND_START
This commit is contained in:
@@ -474,29 +474,20 @@ MissionBlock::get_time_inside(const struct mission_item_s &item)
|
||||
bool
|
||||
MissionBlock::item_contains_position(const struct mission_item_s *item)
|
||||
{
|
||||
// XXX: maybe extend that check onto item properties
|
||||
if (item->nav_cmd == NAV_CMD_DO_JUMP ||
|
||||
item->nav_cmd == NAV_CMD_DO_CHANGE_SPEED ||
|
||||
item->nav_cmd == NAV_CMD_DO_SET_SERVO ||
|
||||
item->nav_cmd == NAV_CMD_DO_LAND_START ||
|
||||
item->nav_cmd == NAV_CMD_DO_DIGICAM_CONTROL ||
|
||||
item->nav_cmd == NAV_CMD_IMAGE_START_CAPTURE ||
|
||||
item->nav_cmd == NAV_CMD_IMAGE_STOP_CAPTURE ||
|
||||
item->nav_cmd == NAV_CMD_VIDEO_START_CAPTURE ||
|
||||
item->nav_cmd == NAV_CMD_VIDEO_STOP_CAPTURE ||
|
||||
item->nav_cmd == NAV_CMD_DO_MOUNT_CONFIGURE ||
|
||||
item->nav_cmd == NAV_CMD_DO_MOUNT_CONTROL ||
|
||||
item->nav_cmd == NAV_CMD_DO_SET_ROI ||
|
||||
item->nav_cmd == NAV_CMD_ROI ||
|
||||
item->nav_cmd == NAV_CMD_DO_SET_CAM_TRIGG_DIST ||
|
||||
item->nav_cmd == NAV_CMD_DO_VTOL_TRANSITION ||
|
||||
item->nav_cmd == NAV_CMD_DELAY ||
|
||||
item->nav_cmd == NAV_CMD_RETURN_TO_LAUNCH) {
|
||||
if (item->nav_cmd == NAV_CMD_WAYPOINT ||
|
||||
item->nav_cmd == NAV_CMD_LOITER_UNLIMITED ||
|
||||
item->nav_cmd == NAV_CMD_LOITER_TIME_LIMIT ||
|
||||
item->nav_cmd == NAV_CMD_LAND ||
|
||||
item->nav_cmd == NAV_CMD_TAKEOFF ||
|
||||
item->nav_cmd == NAV_CMD_LOITER_TO_ALT ||
|
||||
item->nav_cmd == NAV_CMD_VTOL_TAKEOFF ||
|
||||
item->nav_cmd == NAV_CMD_VTOL_LAND) {
|
||||
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user