dji-sdk / Mobile-SDK-iOS

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

DJICamera Mini 2 does not support getMode/setMode #508

Closed brien-crean closed 2 years ago

brien-crean commented 2 years ago

When trying to get or set the DJICamera mode I get the error: Error Domain=DJISDKErrorDomain Code=-1013 "Current product does not support this feature.(code:-1013)"

Is there a different way to change the DJICameraMode to DJICameraModeShootPhoto, DJICameraModeRecordVideo etc with the Mini 2?

I tested on the updated version of the sample app with SDK Version 4.16

IMG_6686

dji-dev commented 2 years ago

Agent comment from DJI SDK in Zendesk ticket #61639:

尊敬的开发者,感谢您联系DJI 大疆创新 由于github不是我们主要的咨询渠道,您的问题可能跟进不及时。我们建议您通过填写表单( https://djisdksupport.zendesk.com/hc/zh-cn/requests/new )向我们反馈问题。或者您也可以在论坛发帖,与其它开发者交流。论坛链接:https://djisdksupport.zendesk.com/hc/zh-cn/community/topics

Dear developer, thank you for contacting DJI. Since github is not our main consultation channel, your questions may not be followed up in time. We recommend that you fill in the form (https://djisdksupport.zendesk.com/hc/en-us/requests/new) to report problems to us. Or you can post in the forum to communicate with other developers. Forum link: https://djisdksupport.zendesk.com/hc/zh-cn/community/topics

°°°

brien-crean commented 2 years ago

set/getFlatMode works on the mini 2. Closing this issue

if (
    [camera.displayName isEqualToString:DJICameraDisplayNameMavicAir2Camera] ||
    [camera.displayName isEqualToString:DJICameraDisplayNameDJIMini2Camera]
) {
       [camera setFlatMode:DJIFlatCameraModePhotoSingle withCompletion:^(NSError * _Nullable error) {
          if (error) {
            ShowResult(@"ERROR: setFlatMode:withCompletion:. %@", error.description);
          } else {
              dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), 
              dispatch_get_main_queue(), ^{
                 WeakReturn(target);
                 target.isInShootPhotoMode = YES;
               });
           }
        }];
}