• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DJIError类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中dji.common.error.DJIError的典型用法代码示例。如果您正苦于以下问题:Java DJIError类的具体用法?Java DJIError怎么用?Java DJIError使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DJIError类属于dji.common.error包,在下文中一共展示了DJIError类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: switchCameraMode

import dji.common.error.DJIError; //导入依赖的package包/类
private void switchCameraMode(SettingsDefinitions.CameraMode cameraMode){

        Camera camera = FPVDemoApplication.getCameraInstance();
        if (camera != null) {
            camera.setMode(cameraMode, new CommonCallbacks.CompletionCallback() {
                @Override
                public void onResult(DJIError error) {

                    if (error == null) {
                        showToast("Switch Camera Mode Succeeded");
                    } else {
                        showToast(error.getDescription());
                    }
                }
            });
        }
    }
 
开发者ID:lupwei,项目名称:Croprotector,代码行数:18,代码来源:UAVControllerActivity.java


示例2: startRecord

import dji.common.error.DJIError; //导入依赖的package包/类
private void startRecord(){

        final Camera camera = FPVDemoApplication.getCameraInstance();
        if (camera != null) {
            camera.startRecordVideo(new CommonCallbacks.CompletionCallback(){
                @Override
                public void onResult(DJIError djiError)
                {
                    if (djiError == null) {
                        showToast("Record video: success");
                    }else {
                        showToast(djiError.getDescription());
                    }
                }
            }); // Execute the startRecordVideo API
        }
    }
 
开发者ID:lupwei,项目名称:Croprotector,代码行数:18,代码来源:UAVControllerActivity.java


示例3: stopRecord

import dji.common.error.DJIError; //导入依赖的package包/类
private void stopRecord(){

        Camera camera = FPVDemoApplication.getCameraInstance();
        if (camera != null) {
            camera.stopRecordVideo(new CommonCallbacks.CompletionCallback(){

                @Override
                public void onResult(DJIError djiError)
                {
                    if(djiError == null) {
                        showToast("Stop recording: success");
                    }else {
                        showToast(djiError.getDescription());
                    }
                }
            }); // Execute the stopRecordVideo API
        }

    }
 
开发者ID:lupwei,项目名称:Croprotector,代码行数:20,代码来源:UAVControllerActivity.java


示例4: onAttachedToWindow

import dji.common.error.DJIError; //导入依赖的package包/类
@Override
protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    if (DJIModuleVerificationUtil.isCameraModuleAvailable()) {
        DJISampleApplication.getProductInstance().getCamera().setCameraMode(
                DJICameraSettingsDef.CameraMode.RecordVideo,
                new DJICommonCallbacks.DJICompletionCallback() {
                    @Override
                    public void onResult(DJIError djiError) {
                        Utils.setResultToToast(getContext(), "SetCameraMode to recordVideo");
                    }
                }
        );
    }
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:17,代码来源:RecordVideoView.java


示例5: getRightBtnMethod

import dji.common.error.DJIError; //导入依赖的package包/类
@Override
protected void getRightBtnMethod() {

    if (DJIModuleVerificationUtil.isCameraModuleAvailable()) {
        DJISampleApplication.getProductInstance().getCamera().stopRecordVideo(
                new DJICommonCallbacks.DJICompletionCallback() {
                    @Override
                    public void onResult(DJIError djiError) {
                        Utils.setResultToToast(getContext(), "StopRecord");
                        Utils.setResultToText(context, mTexInfo, "00:00:00");
                        timer.cancel();
                        timeCounter = 0;
                    }
                }
        );
    }
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:18,代码来源:RecordVideoView.java


示例6: onAttachedToWindow

import dji.common.error.DJIError; //导入依赖的package包/类
/**
 * Before the playback commands are sent to the aircraft, the camera work mode should be set
 * to playback mode.
 */
@Override
protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    setPlaybackStateCallback();
    if (DJIModuleVerificationUtil.isCameraModuleAvailable()) {
        DJISampleApplication.getProductInstance().getCamera().setCameraMode(
                DJICameraSettingsDef.CameraMode.Playback,
                new DJICommonCallbacks.DJICompletionCallback() {
                    @Override
                    public void onResult(DJIError djiError) {

                    }
                }
        );
    }
    if (!DJIModuleVerificationUtil.isPlaybackAvailable()) {
        mStringBuffer.delete(0, mStringBuffer.length());
        mStringBuffer.append("This product does not support Playback function");
        mHandler.sendEmptyMessage(CHANGE_TEXT_VIEW);
        Utils.setResultToToast(getContext(), "Not support");
    }

}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:29,代码来源:PlaybackPushInfoView.java


示例7: onDetachedFromWindow

import dji.common.error.DJIError; //导入依赖的package包/类
@Override
protected void onDetachedFromWindow() {
    super.onDetachedFromWindow();

    if (DJIModuleVerificationUtil.isPlaybackAvailable()) {
        DJISampleApplication.getProductInstance().getCamera()
                .getPlayback().setDJICameraPlayBackStateCallBack(null);

        DJISampleApplication.getProductInstance().getCamera().setCameraMode(
                DJICameraSettingsDef.CameraMode.ShootPhoto,
                new DJICommonCallbacks.DJICompletionCallback() {
                    @Override
                    public void onResult(DJIError djiError) {

                    }
                }
        );
    }
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:20,代码来源:PlaybackPushInfoView.java


示例8: onDetachedFromWindow

import dji.common.error.DJIError; //导入依赖的package包/类
@Override
protected void onDetachedFromWindow() {
    super.onDetachedFromWindow();

    if (DJIModuleVerificationUtil.isCameraModuleAvailable()) {
        DJISampleApplication.getProductInstance().getCamera().setCameraMode(
                DJICameraSettingsDef.CameraMode.ShootPhoto,
                new DJICommonCallbacks.DJICompletionCallback() {
                    @Override
                    public void onResult(DJIError djiError) {

                    }
                }
        );

        if (DJIModuleVerificationUtil.isPlaybackAvailable()) {
            DJISampleApplication.getProductInstance().
                    getCamera().getPlayback().setDJICameraPlayBackStateCallBack(null);
        }
    }
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:22,代码来源:PlaybackCommandsView.java


示例9: onAttachedToWindow

import dji.common.error.DJIError; //导入依赖的package包/类
@Override
protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    if (DJIModuleVerificationUtil.isCameraModuleAvailable()) {
        if (DJIModuleVerificationUtil.isMediaManagerAvailable()) {
            DJISampleApplication.getProductInstance().getCamera().setCameraMode(
                    DJICameraSettingsDef.CameraMode.MediaDownload,
                    new DJICommonCallbacks.DJICompletionCallback() {
                        @Override
                        public void onResult(DJIError djiError) {
                            if (null == djiError)
                                fetchMediaList();
                        }
                    }
            );
        } else {
            mTexInfo.setText(R.string.not_support_mediadownload);
        }
    }
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:22,代码来源:FetchMediaView.java


示例10: onDetachedFromWindow

import dji.common.error.DJIError; //导入依赖的package包/类
@Override
protected void onDetachedFromWindow() {
    super.onDetachedFromWindow();

    if (DJIModuleVerificationUtil.isCameraModuleAvailable()) {
        DJISampleApplication.getProductInstance().getCamera().setCameraMode(
                DJICameraSettingsDef.CameraMode.ShootPhoto,
                new DJICommonCallbacks.DJICompletionCallback() {
                    @Override
                    public void onResult(DJIError djiError) {

                    }
                }
        );
    }
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:17,代码来源:FetchMediaView.java


示例11: onGetRegisteredResult

import dji.common.error.DJIError; //导入依赖的package包/类
@Override
public void onGetRegisteredResult(DJIError error) {
    if(error == DJISDKError.REGISTRATION_SUCCESS) {
        DJISDKManager.getInstance().startConnectionToProduct();
    } else {
        Handler handler = new Handler(Looper.getMainLooper());
        handler.post(new Runnable() {

            @Override
            public void run() {
                Toast.makeText(getApplicationContext(),
                        R.string.sdk_registration_message,
                                            Toast.LENGTH_LONG).show();
            }
        });

    }
    Log.v(TAG, error.getDescription());
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:20,代码来源:DJISampleApplication.java


示例12: switchCameraMode

import dji.common.error.DJIError; //导入依赖的package包/类
private void switchCameraMode(SettingsDefinitions.CameraMode cameraMode){

        Camera camera = FPVDemoApplication.getCameraInstance();
        if (camera != null) {
            camera.setMode(cameraMode, new CommonCallbacks.CompletionCallback() {
                @Override
                public void onResult(DJIError error) {

                    if (error == null) {
                        showToast("Switch Camera Mode Succeeded");
                    } else {
                        showToast(error.getDescription());
                    }
                }
            });
            }
    }
 
开发者ID:DJI-Mobile-SDK-Tutorials,项目名称:Android-FPVDemo,代码行数:18,代码来源:MainActivity.java


示例13: configWayPointMission

import dji.common.error.DJIError; //导入依赖的package包/类
private void configWayPointMission(){

        if (waypointMissionBuilder == null){

            waypointMissionBuilder = new WaypointMission.Builder().finishedAction(mFinishedAction)
                    .headingMode(mHeadingMode)
                    .autoFlightSpeed(mSpeed)
                    .maxFlightSpeed(mSpeed)
                    .flightPathMode(WaypointMissionFlightPathMode.NORMAL);

        }else
        {
            waypointMissionBuilder.finishedAction(mFinishedAction)
                    .headingMode(mHeadingMode)
                    .autoFlightSpeed(mSpeed)
                    .maxFlightSpeed(mSpeed)
                    .flightPathMode(WaypointMissionFlightPathMode.NORMAL);

        }

        if (waypointMissionBuilder.getWaypointList().size() > 0){

            for (int i=0; i< waypointMissionBuilder.getWaypointList().size(); i++){
                waypointMissionBuilder.getWaypointList().get(i).altitude = altitude;
            }

            setResultToToast("Set Waypoint attitude successfully");
        }

        DJIError error = getWaypointMissionOperator().loadMission(waypointMissionBuilder.build());
        if (error == null) {
            setResultToToast("loadWaypoint succeeded");
        } else {
            setResultToToast("loadWaypoint failed " + error.getDescription());
        }

    }
 
开发者ID:lupwei,项目名称:Croprotector,代码行数:38,代码来源:WayPointActivity.java


示例14: uploadWayPointMission

import dji.common.error.DJIError; //导入依赖的package包/类
private void uploadWayPointMission(){

        getWaypointMissionOperator().uploadMission(new CommonCallbacks.CompletionCallback() {
            @Override
            public void onResult(DJIError error) {
                if (error == null) {
                    setResultToToast("Mission upload successfully!");
                } else {
                    setResultToToast("Mission upload failed, error: " + error.getDescription() + " retrying...");
                    getWaypointMissionOperator().retryUploadMission(null);
                }
            }
        });

    }
 
开发者ID:lupwei,项目名称:Croprotector,代码行数:16,代码来源:WayPointActivity.java


示例15: startWaypointMission

import dji.common.error.DJIError; //导入依赖的package包/类
private void startWaypointMission(){

        getWaypointMissionOperator().startMission(new CommonCallbacks.CompletionCallback() {
            @Override
            public void onResult(DJIError error) {
                setResultToToast("Mission Start: " + (error == null ? "Successfully" : error.getDescription()));
            }
        });

    }
 
开发者ID:lupwei,项目名称:Croprotector,代码行数:11,代码来源:WayPointActivity.java


示例16: stopWaypointMission

import dji.common.error.DJIError; //导入依赖的package包/类
private void stopWaypointMission(){

        getWaypointMissionOperator().stopMission(new CommonCallbacks.CompletionCallback() {
            @Override
            public void onResult(DJIError error) {
                setResultToToast("Mission Stop: " + (error == null ? "Successfully" : error.getDescription()));
            }
        });

    }
 
开发者ID:lupwei,项目名称:Croprotector,代码行数:11,代码来源:WayPointActivity.java


示例17: onDetachedToWindow

import dji.common.error.DJIError; //导入依赖的package包/类
protected void onDetachedToWindow() {
    super.onDetachedFromWindow();

    if (DJIModuleVerificationUtil.isCameraModuleAvailable()) {
        DJISampleApplication.getProductInstance().getCamera().setCameraMode(
                DJICameraSettingsDef.CameraMode.ShootPhoto,
                new DJICommonCallbacks.DJICompletionCallback() {
                    @Override
                    public void onResult(DJIError djiError) {
                        Utils.setResultToToast(getContext(), "SetCameraMode to shootPhoto");
                    }
                }
        );
    }
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:16,代码来源:RecordVideoView.java


示例18: getLeftBtnMethod

import dji.common.error.DJIError; //导入依赖的package包/类
@Override
protected void getLeftBtnMethod() {

    Utils.setResultToText(context, mTexInfo, "00:00:00");
    if (DJIModuleVerificationUtil.isCameraModuleAvailable()) {
        DJISampleApplication.getProductInstance().getCamera().startRecordVideo(
                new DJICommonCallbacks.DJICompletionCallback() {
                    @Override
                    public void onResult(DJIError djiError) {
                        //success so, start recording
                        if (null == djiError) {
                            Utils.setResultToToast(getContext(), "Start record");
                            timer = new Timer();
                            timer.schedule(new TimerTask() {
                                @Override
                                public void run() {
                                    timeCounter = timeCounter + 1;
                                    hours = TimeUnit.MILLISECONDS.toHours(timeCounter);
                                    minutes = TimeUnit.MILLISECONDS.toMinutes(timeCounter) - (hours * 60);
                                    seconds = TimeUnit.MILLISECONDS.toSeconds(timeCounter) - ((hours * 60 * 60) + (minutes * 60));
                                    time = String.format("%02d:%02d:%02d", hours, minutes, seconds);
                                    Utils.setResultToText(context, mTexInfo, time);
                                }
                            }, 0, 1);
                        }

                    }
                }
        );
    }

}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:33,代码来源:RecordVideoView.java


示例19: onAttachedToWindow

import dji.common.error.DJIError; //导入依赖的package包/类
/**
     * Every commands relative to the shooting photos are only allowed executed in shootphoto work
     * mode.
     */
    @Override
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        Log.v("Attached To Window", "onAttachedToWindow");

        if (isModuleAvailable()) {
//            DJISampleApplication.getProductInstance().getCamera().getCameraMode(
//                new DJIBaseComponent.DJICompletionCallbackWith<DJICameraSettingsDef.CameraMode>() {
//                    @Override
//                    public void onSuccess(DJICameraSettingsDef.CameraMode cameraMode) {
//                        mCameraMode = cameraMode;
//                    }
//
//                    @Override
//                    public void onFailure(DJIError djiError) {
//
//                    }
//                }
//            );

            DJISampleApplication.getProductInstance().getCamera().setCameraMode(
                    DJICameraSettingsDef.CameraMode.ShootPhoto,
                    new DJICommonCallbacks.DJICompletionCallback() {
                        @Override
                        public void onResult(DJIError djiError) {

                        }
                    }
            );
        }
    }
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:36,代码来源:ShootSinglePhotoView.java


示例20: setShootPhotoCameraMode

import dji.common.error.DJIError; //导入依赖的package包/类
private void setShootPhotoCameraMode() {
    DJISampleApplication.getProductInstance().getCamera().setCameraMode(
            DJICameraSettingsDef.CameraMode.ShootPhoto,
            new DJICommonCallbacks.DJICompletionCallback() {
                @Override
                public void onResult(DJIError djiError) {
                    if (null == djiError) {
                        mHandler.post(runSetManaualExposureMode);
                    }

                }
            }
    );
}
 
开发者ID:ShaolinZhang,项目名称:HACKxFDU-CrisisProbingUAV,代码行数:15,代码来源:SetGetISOView.java



注:本文中的dji.common.error.DJIError类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Arrays类代码示例发布时间:2022-05-23
下一篇:
Java AndPredicate类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap