Please select Into the mobile phone version | Continue to access the computer ver.
When to use DJISDKManagerDelegate. componentConnectedWithKey or p...
643 3 2021-1-20
Uploading and Loding Picture ...(0/1)
o(^-^)o
twissmueller
lvl.4
Flight distance : 55797 ft
Germany
Offline

I am wondering about what the difference in when and how to access a component after a product connected.

  • One can either wait untilDJISDKManagerDelegate.productConnected and productChanged get called and then access the component

or wait for
  • DJISDKManagerDelegate.componentConnectedWithKey gets called, check for the key and then get the component from the product.

Can I safely assume, that when a product connected, all its components are connected as well?

Are there any advantages or disadvantages of any of the both methods above? Maybe different use cases?

Have also asked this question on StackOverflow: https://stackoverflow.com/q/65806875/1065468

2021-1-20
Use props
想养一条边牧
lvl.3
Flight distance : 1155 ft
Hong Kong
Offline

Maybe you can use methods componentConnectedWithKey:andIndex, componentDisconnectedWithKey:andIndex to listen the compoment status.
2021-1-22
Use props
twissmueller
lvl.4
Flight distance : 55797 ft
Germany
Offline

想养一条边牧 Posted at 1-22 03:28
Maybe you can use methods componentConnectedWithKey:andIndex, componentDisconnectedWithKey:andIndex to listen the compoment status.

Yes, thank you, this is what I do. I use this method and check the key to determine which component changed.

But I was wondering if by the time the product connected all the components also have connected or does it take longer for them somehow to get connected?
2021-1-22
Use props
twissmueller
lvl.4
Flight distance : 55797 ft
Germany
Offline

Got a very helpful reply on SO which confirms my assumption that components might connect at a later point after product connection and not immediately after.

https://stackoverflow.com/q/65806875/1065468
2021-1-25
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules