dji-sdk / Mobile-SDK-iOS

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

The sdcard is always busy after call refreshFileList #536

Open daoxuanquan opened 1 year ago

daoxuanquan commented 1 year ago

The sdcard was always busy after i called DemoComponentHelper.fetchCamera()?.mediaManager?.refreshFileList. I have tried to exit the playback mode by called exitPlayback() method and set the mode to shootPhoto but it seem not helpful. Because the sd card was busy so it unable to shoot photo either. I also tried on DJISdkDemo and got the same issues. The steps for reproduce. call method refreshFileList -> call shoot photo. (or check the sdcard by calling remainingSpaceInMB in DJICameraStorageState and see it return 0) -> got messages "Captured image failed because the sdcard is busy or the current mode not supported" If you know how to take a picture affter calling refreshFileList, please point me out.

DJI-William commented 1 year ago
  1. Call enterPlayback to change the camera mode to the media download mode.
  2. After calling the refreshFileListWithCompletion, you need to check the DJIMediaFileListState. It should be DJIMediaFileListStateUpToDate.
  3. Call exitPlayback to exit the media download mode.
  4. Call setFlatMode:withCompletion to change your camera mode to DJIFlatCameraModePhotoSingle and take photos.
daoxuanquan commented 1 year ago

IMG_1614 Yes. After i did like above steps. I got this message.

DJI-William commented 1 year ago

Which aircraft and camera you are using? Have you set the storage location correctly?

daoxuanquan commented 1 year ago

I'm using mavic air 2. I seem like only happened when have a lot of image in sd card > 200. I also check the DJIMediaFileListState, and it's DJIMediaFileListStateUpToDate but the sdcard still busy.

daoxuanquan commented 1 year ago

I think so. Because everything is Ok if i not call refreshFileListWithCompletion

daoxuanquan commented 1 year ago

Seem the aircraft has a configuration about locking read and write ability of sd card. I have to restart the aircraft to put the state to normal.

IMG_0765

DJI-William commented 1 year ago

You are correct, it seems like the Mavic Air 2 has this kind of feature. Please send an email to support@dji.com asking how to disable this feature.