Mobile-SDK-iOS icon indicating copy to clipboard operation
Mobile-SDK-iOS copied to clipboard

DJICamera object is not available when fpvViewController delegate didUpdateCurrentFPVViewCurrentCameraIndexTo method is called after drone reconnects

Open YaroTs opened this issue 4 years ago • 3 comments

Drone: Mavic 2 Zoom Mobile SDK: 4.14

My ViewController extends DUXDefaultLayoutViewController and confirms to DUXFPVViewControllerDelegate protocol.

When func fpvViewController(_ fpvViewController: DUXFPVViewController, didUpdateCurrentFPVViewCurrentCameraIndexTo updatedFPVViewCurrentCameraIndex: UInt) is called after drone reconnect, DJIAircraft.cameras array is empty, and DJIAircraft.camera is nil.

Steps to reproduce:

  1. Connect remote controller
  2. Turn remote controller and drone on
  3. Turn drone off
  4. Turn drone on

YaroTs avatar Apr 16 '21 06:04 YaroTs

Agent comment from Luce Luo in Zendesk ticket #46561:

Dear Customer,

Thank you for contacting DJI. If the MSDK needs some time to connect each component(flight controller, camera, etc) after reconnecting the drone. So recommended using componentConnectedWithKey:andIndex method to ensure the component connected first and then fetch it.

Thanks,

Luce Luo DJI Developer Support

dji-dev avatar Apr 16 '21 09:04 dji-dev

Agent comment from Hummels Lei in Zendesk ticket #46561:

Dear YaroTs,

In regards to your request, we haven't received any replies from you for 2 days.

If your request has been resolved, please ignore this email.

If not, please reply to this email directly so that we can provide you with further assistance.

Thank you for choosing DJI.

Best regards,

DJI Developer Support

dji-dev avatar Apr 19 '21 04:04 dji-dev

If the MSDK needs some time to connect each component(flight controller, camera, etc) after reconnecting the drone. So recommended using componentConnectedWithKey:andIndex method to ensure the component connected first and then fetch it.

Well, I understand your point, but still we have a situation that dji sdk ux components and its api like DUXFPVViewController and DUXFPVViewControllerDelegate are not consistent with the main sdk part.

It seems it's unexpected behaviour for sdk users. Could you please fix it or, at least, update documentation of appropriate components?

YaroTs avatar Apr 26 '21 14:04 YaroTs