Getting Gimbal Data
已完成I'm trying to get the gimbal data using MSDK.
I used the following example:
KeyManager.getInstance.listen(KeyTools.createKey(GimbalKey. KeyConnection, componentIndexType),this, callback)
But for some reason I get an error Unresolved reference: componentIndexType, Unresolved reference: callback
I would love to know what I am doing wrong? In which file should I write the code section? What imports should I do before that?
Can Someone please provide sample code for this?
Thanks
-
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!
请先登录再写评论。
评论
4 条评论