dji-sdk / Mobile-SDK-iOS

DJI Mobile SDK for iOS: http://developer.dji.com/mobile-sdk/
Other
579 stars 253 forks source link

Can't detect if the aircraft turn off #520

Open daoxuanquan opened 2 years ago

daoxuanquan commented 2 years ago

I'm using mavic air 2, and the the productChange not called when i restart the aircraft. The status still connected, nothing happened

daoxuanquan commented 2 years ago

No one answer.

dji-dev commented 2 years ago

Agent comment from yating.liao in Zendesk ticket #65056:

onProductChanged will be called back if the aircraft is disconnected or if only the remote is connected. If the remote control is already connected to the aircraft at the time of registration, then onProductChanged will not be called, but onProductConnect will be called. Which case are you in?

°°°

daoxuanquan commented 2 years ago

i removed the battery and put it back in but onProductConnect is not called. but when i work with android sdk onProductConnect is called in same case

dji-dev commented 2 years ago

Agent comment from yating.liao in Zendesk ticket #65056:

I will use IOS SDK to test on DJI AIR 2S with the latest firmware, and if the problem does exist, I will promptly hand it over to the engineers. Please wait for a while.

°°°

daoxuanquan commented 2 years ago

Yes. Please let me know the results when you're done testing

dji-dev commented 2 years ago

Agent comment from yating.liao in Zendesk ticket #65056:

I tested on AIR 2S with the latest firmware. The test results are as follows.

  1. the performance of IOS and Android is the same when powering off and restarting the aircraft in the connected state.
  2. onProductConnect is called when connecting directly to the drone for the first time, and onProductChanged is called when the drone is disconnected and connected again. These logics are correct. Here is the log of my test, you can retrieve ProductConnect and ProductChanged to see the order and location of the calls. link:https://pan-sec.djicorp.com/s/7Ycm5TiwoHwiypS password:dji123

    °°°

daoxuanquan commented 2 years ago

Could you check again with mavic air 2. I'm sure this is a bug on macvic air 2

dji-dev commented 2 years ago

Agent comment from yating.liao in Zendesk ticket #65056:

In fact, if you keep the app open and remove the battery after the SDK recognizes the drone and then restart the drone, onProductConnect will not be called at that point. What is called in this case is onProductChanged.

Maybe you can tell me what I should have to do to find this error. My previous test was to keep the app open after the drone was connected and restart the drone. If this test sequence is correct, then the test results are likely to be the same.

°°°

dji-dev commented 2 years ago

Agent comment from yating.liao in Zendesk ticket #65056:

You can see my test video in the link, and you can see in the video that onProductChanged is called back normally. link:https://pan-sec.djicorp.com/s/7Ycm5TiwoHwiypS password:dji123

°°°

daoxuanquan commented 2 years ago

Thank you for your support. After all i decided to upgrade drone firmware and then it's worked.

dji-dev commented 2 years ago

Agent comment from yating.liao in Zendesk ticket #65056:

I'm glad I could help you! Generally, we perform tests on the latest firmware. You can also try to upgrade the firmware to fix the problem if you encounter it.

°°°