Я использую приложение камеры со страницы руководства DJI (https://developer.dji.com/windows-sdk/documentation/tutorials/index.html).
Я подключил Drone (DJI Mavi c 2 Enterprise) к P C с помощью прилагаемого кабеля, и он распознается (например, у меня есть доступ к его внутренней памяти, и я также могу получить к нему доступ через приложение DJI Assistant 2)
Когда я пытаюсь отладить код из Visual Studio, чтобы получить Я получаю эту ошибку: https://i.stack.imgur.com/vwH7J.png
В этом методе:
private async void Instance_SDKRegistrationEvent(SDKRegistrationState state, SDKError resultCode)
{
if (resultCode == SDKError.NO_ERROR)
{
System.Diagnostics.Debug.WriteLine("Register app successfully.");
//Must in UI Thread
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async () =>
{
//Raw data and decoded data listener
if (videoParser == null)
{
videoParser = new DJIVideoParser.Parser();
videoParser.Initialize(delegate (byte[] data)
{
//Note: This function must be called because we need DJI Windows SDK to help us to parse frame data.
return DJISDKManager.Instance.VideoFeeder.ParseAssitantDecodingInfo(0, data);
});
//Set the swapChainPanel to display and set the decoded data callback.
videoParser.SetSurfaceAndVideoCallback(0, 0, swapChainPanel, ReceiveDecodedData);
DJISDKManager.Instance.VideoFeeder.GetPrimaryVideoFeed(0).VideoDataUpdated += OnVideoPush;
}
//get the camera type and observe the CameraTypeChanged event.
DJISDKManager.Instance.ComponentManager.GetCameraHandler(0, 0).CameraTypeChanged += OnCameraTypeChanged;
var type = await DJISDKManager.Instance.ComponentManager.GetCameraHandler(0, 0).GetCameraTypeAsync();
OnCameraTypeChanged(this, type.value);
});
}
else
{
System.Diagnostics.Debug.WriteLine("SDK register failed, the error is: ");
System.Diagnostics.Debug.WriteLine(resultCode.ToString());
}
}