private async Task <SDKError> SetCameraWorkMode(CameraWorkMode mode) { CameraWorkModeMsg workMode = new CameraWorkModeMsg { value = mode, }; SDKError retCode = await DJISDKManager.Instance.ComponentManager.GetCameraHandler(0, 0).SetCameraWorkModeAsync(workMode); return(retCode); }
private async void SetCameraWorkMode(CameraWorkMode mode) { if (DJISDKManager.Instance.ComponentManager != null) { CameraWorkModeMsg workMode = new CameraWorkModeMsg { value = mode, }; var retCode = await DJISDKManager.Instance.ComponentManager.GetCameraHandler(0, 0).SetCameraWorkModeAsync(workMode); if (retCode != SDKError.NO_ERROR) { OutputTB.Text = "Set camera work mode to " + mode.ToString() + "failed, result code is " + retCode.ToString(); } } else { OutputTB.Text = "SDK hasn't been activated yet."; } }