航点规划,load成功 upload 失败
0
initMissionBuilder(30.86592438333333,120.06179453333334);
showToast("1");
List<Waypoint> resultList = new ArrayList<>();
showToast("2");
addPoint(resultList,30.86592438333333,120.06179453333334,50,-90);
showToast("3");
addPoint(resultList,30.865890983333333,120.06155679999999,50,-30);
showToast("4");
addPoint(resultList,30.86589263333334,120.06219309999999,50,-30);
showToast("5");
builder.waypointList(resultList);
showToast("6");
builder.waypointCount(resultList.size());
showToast("7");
DJIError djiError = operator.loadMission(builder.build());
if (djiError == null) {
showToast("loadWaypoint succeeded");
operator.uploadMission(new CommonCallbacks.CompletionCallback() {
@Override
public void onResult(DJIError djiError) {
if (djiError==null) {
showToast("8");
operator.startMission(new CommonCallbacks.CompletionCallback() {
@Override
public void onResult(DJIError djiError) {
showToast(djiError.getDeion()+djiError.getErrorCode()+"");
}
});
}else {
showToast(djiError.getDeion()+djiError.getErrorCode()+"");
}
}
});
} else {
showToast("loadWaypoint failed " + djiError.getDeion());
} |
|
|
|