Search code examples
iosdji-sdk

M210 RTK Get Gimbal Control w/ Dual Remotes (iOS SDK)


In DJI GO 4 on iOS when an M210 RTK drone is being used on two separate iPads in a dual remote (master/slave) configuration, a "Get Gimbal Control" button appears in the app for whichever remote does not have control. When the button is tapped, that iPad, and remote gains control of the camera gimbal.

I am attempting to add this functionality to our app. In the DJI SDK (4.7.1), I've located the following functions that look like they correspond to the UI from DJI GO 4.

In DJIRemoteController.h on DJIRemoteControllerDelegate:

- (void)remoteController:(DJIRemoteController *_Nonnull)rc didReceiveGimbalControlRequestFromSlave:(DJIRCInformation *_Nonnull)information;


In DJIRemoteController.h on DJIRemoteController:

- (void)requestGimbalControlWithCompletion:(void (^_Nonnull)(DJIRCRequestGimbalControlResult result, NSError *_Nullable error))completion;

- (void)respondToRequestForGimbalControl:(BOOL)response fromSlaveRC:(uint32_t)rcID;


The problem is, when I execute this call from the slave iPad/remote it returns an error saying that the product doesn't support this feature. This renders the other DJI SDK functions I've mentioned irrelevant.

[djiAircraft.remoteController requestGimbalControlWithCompletion:^(DJIRCRequestGimbalControlResult result, NSError * _Nullable error) {
    NSLog(@"%@", error);
}];


Error Domain=DJISDKErrorDomain Code=-1013 \"Current product does not support this feature.(code:-1013)\" UserInfo={NSLocalizedDescription=Current product does not support this feature.(code:-1013)}


That being said, am I missing something here? Is there a different set of APIs I am supposed to be using to implement this functionality for the M210 w/Dual Remotes? I have not been able to locate anything that accomplishes this, and at this point, I am under the assumption that it may just be missing from the public headers in the DJI SDK.


Solution

  • Those interfaces are for Inspire 1 Master/Salve dual RC gimbal control. So it will return -1013 error for Inspire 2. And For Inspire 2, It still not support switch gimbal control now.