dji-sdk / Mobile-SDK-iOS

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

Matrice 300 RTK - How to shoot a image? #439

Closed dingpwen closed 3 years ago

dingpwen commented 3 years ago

When using following codes: [DJISDKManager.product.camera setShootPhotoMode:DJICameraShootPhotoModeSingle withCompletion:^(NSError _Nullable error) { if(!error) { [DJISDKManager.product.camera startShootPhotoWithCompletion:^(NSError _Nullable error) { if (error) { [subscriber sendError:error]; } else { [subscriber sendNext:@""]; [subscriber sendCompleted]; } }]; } else { [ZQLog bLogE:[NSString stringWithFormat:@"camera error:%@", error.description]]; } }];

It tells me : does not support this feature. (code:-1013)

if only: [DJISDKManager.product.camera startShootPhotoWithCompletion:^(NSError * _Nullable error) { if (error) { [subscriber sendError:error]; } else { [subscriber sendNext:@""]; [subscriber sendCompleted]; } }];

No error. But no callback for :

dji-dev commented 3 years ago

Agent comment from DJI SDK in Zendesk ticket #43818:

When using following codes: [DJISDKManager.product.camera setShootPhotoMode:DJICameraShootPhotoModeSingle withCompletion:^(NSError _Nullable error) { if(!error) { [DJISDKManager.product.camera startShootPhotoWithCompletion:^(NSError _Nullable error) { if (error) { [subscriber sendError:error]; } else { [subscriber sendNext:@""]; [subscriber sendCompleted]; } }]; } else { [ZQLog bLogE:[NSString stringWithFormat:@"camera error:%@", error.description]]; } }];

It tells me : does not support this feature. (code:-1013)

if only: [DJISDKManager.product.camera startShootPhotoWithCompletion:^(NSError * _Nullable error) { if (error) { [subscriber sendError:error]; } else { [subscriber sendNext:@""]; [subscriber sendCompleted]; } }];

No error. But no callback for :

Matheus193dn commented 3 years ago

@dingpwen Hey, can you try this? image

dingpwen commented 3 years ago

@dingpwen Hey, can you try this? image

Thanks. setFlatMode can works, but startShootPhotoWithCompletion can not get any image by the delegate of didGenerateNewMediaFile

My codes(SD card is ok): if(camera.isFlatCameraModeSupported) { [ZQLog bLogI:@"isFlatCameraModeSupported"]; [camera setFlatMode:DJIFlatCameraModePhotoSingle withCompletion:^(NSError * _Nullable error) { if(error) { [ZQLog bLogE:[NSString stringWithFormat:@"camera error:%@", error.description]]; } else { [camera startShootPhotoWithCompletion:^(NSError * _Nullable error) { if (error) { [ZQLog bLogE:[NSString stringWithFormat:@"camera error:%@", error.description]]; [subscriber sendError:error]; } else { [subscriber sendNext:@""]; [subscriber sendCompleted]; } }]; } }];

Matheus193dn commented 3 years ago

@dingpwen Did you use the latest version of firmware on both drone and remote controller?

dingpwen commented 3 years ago

@dingpwen Did you use the latest version of firmware on both drone and remote controller?

Yes!All are updated to lastest version. I try it with DJI Aassistant, and i think it does not need test outside.

dingpwen commented 3 years ago

What a fuck, when set to setFlatMode:DJIFlatCameraModePhotoInterval , the camera can take pictures! But when setShootPhotoMode:DJICameraShootPhotoModeSingle, the camera did nothing!