Getting Gimbal Data

Completed

Comments

3 comments

  • DJI Developer Support
    You need to pass the correct parameter at the position of componentIndexType. For example, if your gimbal is in the main position, then pass componentIndexType.LEFT_OR_MAIN.
    0
    Comment actions Permalink
  • Rakesh John
    KeyManager.getInstance().getValue(KeyTools.createKey(GimbalKey.KeyGimbalAttitude), new CommonCallbacks.CompletionCallbackWithParam<Attitude>() {
    @Override
    public void onSuccess(Attitude attitude) {
    gimbal_attitude = attitude;
    }

    @Override
    public void onFailure(@NonNull IDJIError error) {

    }
    });

    if(gimbal_attitude != null) {
    gimbal_tilt = gimbal_attitude.getPitch();
    gimbal_Pan = gimbal_attitude.getRoll();
    gimbal_Yaw = gimbal_attitude.getYaw();
    }


    Hope this helps!

     

    0
    Comment actions Permalink
  • DJI Developer Support
    Are you experiencing an issue where you are unable to retrieve gimbal attitude data? You can try passing the position of the gimbal when creating the key, which is the value included in componentIndexType.
    0
    Comment actions Permalink

Please sign in to leave a comment.