航点任务没有暂停

时间:2019-05-29 07:03:53

标签: android dji-sdk

onExecutionUpdate中,我正在检查isWaypointReached的状态。如果状态为false,则执行会停止,并且之后不会从onExecutionUpdate回调中进行任何更新。

@Override

public void onExecutionUpdate(final WaypointMissionExecutionEvent executionEvent) {

    int waypoint_size = executionEvent.getProgress().totalWaypointCount;
    int target_waypoint_index = executionEvent.getProgress().targetWaypointIndex;

    if (waypoint_size - 1 == target_waypoint_index) {
        if (executionEvent.getProgress().isWaypointReached == true) {
            if (executionEvent.getProgress().executeState.toString().equals("FINISHED_ACTION")) {
                setResultToToast("Aircraft reached at waypoint location");
                stopWaypointMission();
            }
        }

    } else {
        if (executionEvent.getProgress().isWaypointReached == true) {
            if (executionEvent.getProgress().executeState.toString().equals("BEGIN_ACTION")) {
                setResultToToast("aircraft reached at location " + "" + target_waypoint_index);
                pauseWaypointMission();
            }
        }

    }

}
  

2019-05-29 12:03:28.442 12792-12834 /? E / exe事件:当前状态=执行中   状态=执行进度=总计数= 2目标索引= 0 =   假状态=初始化错误=空

     

2019-05-29 12:03:28.443 12792-12834 /? E / waypoint_reached:错误

1 个答案:

答案 0 :(得分:0)

您正在使用哪个dji sdk? MSDK OSDK?

DJI任务计划中存在许多错误。因此,您必须显示正在接收的错误消息,例如

0xE9    Point data not enough
0xEA    WayPoint mission data not enough
0xEB    WayPoints not enough

对于我的情况,我要求无人机通过调用Mission :: stop来停止。用Point还不够。很有可能是内部的ACK卡住了。我目前正在与DJI联络以解决此问题。

如果您可以为我提供准确的描述和错误代码,则可以帮助您获得解决方案。

enter image description here