上传kmz文件失败
已完成MSDK版本:V5.2.0
目标:从遥控器上传kmz文件至无人机M300 RTK用于无人机执行航线任务。
问题:上传失败,请看看是代码写错了?还是SDK有问题?
代码:
String path = getExternalFilesDir("DJI").getAbsolutePath() + File.separator + "0224.kmz";
File kmzFile2 = new File(path);
if (kmzFile2.exists()){
// TODO
WaypointMissionManager.getInstance().pushKMZFileToAircraft(path, new CommonCallbacks.CompletionCallbackWithProgress<Double>() {
@Override
public void onProgressUpdate(Double progress) {
}
@Override
public void onSuccess() {
// Toast.makeText(getApplicationContext(), "成功", Toast.LENGTH_SHORT).show();
LogUtils.e(TAG, "Push File success!");
}
@Override
public void onFailure(@NonNull IDJIError error) {
// Toast.makeText(getApplicationContext(), "失败", Toast.LENGTH_SHORT).show();
LogUtils.e(TAG, "Push File fail!");
}
});
}
kmz文件是从pilot2建图航拍生成的,能在pilot2下正常使用,能够被上述代码正常访问。
上传报错信息:错误码 -5002
E/WP_JNI: loadV2MissionData
E/WP_JNI: uploadV2Mission
E/WP_JNI: current string length 32
I/WaypointV2Abstraction: (onWaypointUploadStateChangeCallback:12) upLoadErrorCode :-5002
E/V5_Test_App: (onFailure:196) Push File fail!
I/art: Do full code cache collection, code=124KB, data=103KB
I/art: Starting a blocking GC JitCodeCache
I/art: After code cache collection, code=111KB, data=77KB
DEBUG模式显示:
ErrorImp{errorType='WAYPOINT', errorCode='MISSION_STATE_HOME_POINT_NOT_RECORD', innerCode='-5002', description='null', hint=''}
请先登录再写评论。
评论
6 条评论