DJIRemoteController

@interface DJIRemoteController : DJIBaseComponent

This class represents the remote controller of the aircraft. It provides * methods to change the settings of the physical remote controller. For some * products (e.g. Inspire 1 and Matric 100), the class provides methods to * manager the slave/master mode of the remote controllers. * * A remote controller is a device that can have a GPS, battery, radio, buttons, * sticks, wheels, and output ports for video. The mobile device is connected * to the remote controller, which is always sending out information about what * everything is doing. The normal remote controller is called the master. A * slave wirelessly connects to the master remote controller at 5 GHz, and the * aircraft can also download information to the slave. The slave can send * gimbal control commands to the master. This configuration allows one person * to fly the aircraft while another person controls the gimbal.

  • Returns the delegate of Remote Controller.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<DJIRemoteControllerDelegate> _Nullable delegate;
  • Query method to check if the Remote Controller supports Remote Focus State Checking.

    Declaration

    Objective-C

    - (BOOL)isRCRemoteFocusCheckingSupported;
  • Sets the Remote Controller’s name.

    Declaration

    Objective-C

    - (void)setRCName:(NSString *_Nonnull)name
        withCompletion:(DJICompletionBlock)completion;

    Parameters

    name

    Remote controller name to be set. Six characters at most.

    completion

    Completion block.

  • Gets the Remote Controller’s name.

    Declaration

    Objective-C

    - (void)getRCNameWithCompletion:
        (void (^_Nonnull)(NSString *_Nullable, NSError *_Nullable))completion;
  • Sets the Remote Controller’s password.

    Declaration

    Objective-C

    - (void)setRCPassword:(NSString *_Nonnull)password
           withCompletion:(DJICompletionBlock)completion;

    Parameters

    password

    password Remote controller password to be set, using a string consisted by 4 digits.

    block

    Completion block.

  • Gets the Remote Controller’s password.

    Declaration

    Objective-C

    - (void)getRCPasswordWithCompletion:
        (void (^_Nonnull)(NSString *_Nullable, NSError *_Nullable))completion;
  • Sets the Remote Controller’s control mode.

    Declaration

    Objective-C

    - (void)setRCControlMode:(DJIRCControlMode)mode
              withCompletion:(DJICompletionBlock)completion;

    Parameters

    mode

    Remote Controller control mode to be set.

    completion

    Completion block.

  • Gets the master Remote Controller’s control mode.

    Declaration

    Objective-C

    - (void)getRCControlModeWithCompletion:
        (void (^_Nonnull)(DJIRCControlMode, NSError *_Nullable))completion;
  • Enters pairing mode, in which the Remote Controller starts pairing with the aircraft. This method is used when the Remote Controller no longer recognizes which aircraft it is paired with.

    Declaration

    Objective-C

    - (void)enterRCToAircraftPairingModeWithCompletion:
        (DJICompletionBlock)completion;
  • Exits pairing mode.

    Declaration

    Objective-C

    - (void)exitRCToAircraftPairingModeWithCompletion:
        (DJICompletionBlock)completion;
  • Gets the pairing status as the Remote Controller is pairing with the aircraft.

    Declaration

    Objective-C

    - (void)getRCToAircraftPairingStateWithCompletion:
        (void (^_Nonnull)(DJIRCToAircraftPairingState,
                          NSError *_Nullable))completion;
  • Sets the charge mode of a connected iOS device. Note: Android devices are always charging when connected to the remote controller. It is only supported by Inspire 2.

    Declaration

    Objective-C

    - (void)setChargeMobileMode:(DJIRemoteControllerChargeMobileMode)chargeMode
                 withCompletion:(DJICompletionBlock)completion;

    Parameters

    chargeMode

    Charge Mobile mode.

    completion

    Completion block that receives the setter result.

  • Gets the mode to charge the connected iOS device. Note that Android devices are always charging when connected to the remote controller. It is only supported by Inspire 2.

    Declaration

    Objective-C

    - (void)getChargeMobileModeWithCompletion:
        (void (^_Nonnull)(DJIRemoteControllerChargeMobileMode,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Completion block that receives the getter result.

  • Sets the gimbal’s pitch speed for the Remote Controller’s upper left wheel (Gimbal Dial).

    Declaration

    Objective-C

    - (void)setRCWheelGimbalSpeed:(uint8_t)speed
                   withCompletion:(DJICompletionBlock)completion;

    Parameters

    speed

    Speed to be set for the gimbal’s pitch, which should in the range of [0, 100], where 0 represents very slow and 100 represents very fast.

    completion

    Completion block.

  • Gets the gimbal’s pitch speed for the Remote Controller’s upper left wheel (Gimbal Dial).

    Declaration

    Objective-C

    - (void)getRCWheelGimbalSpeedWithCompletion:
        (void (^_Nonnull)(uint8_t, NSError *_Nullable))completion;
  • Sets which of the gimbal directions the top left wheel (Gimbal Dial) on the Remote Controller will control. The three options (pitch, roll, and yaw) are outlined in the enum named DJIRCGimbalControlDirection in DJIRemoteControllerDef.h.

    Declaration

    Objective-C

    - (void)setRCControlGimbalDirection:(DJIRCGimbalControlDirection)direction
                         withCompletion:(DJICompletionBlock)completion;

    Parameters

    direction

    Gimbal direction to be set that the top left wheel on the Remote Controller will control.

    completion

    Completion block.

  • Gets which of the gimbal directions the top left wheel (Gimbal Dial) on the Remote Controller will control.

    Declaration

    Objective-C

    - (void)getRCControlGimbalDirectionWithCompletion:
        (void (^_Nonnull)(DJIRCGimbalControlDirection,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Sets custom button’s (Back Button’s) tags, which can be used by the user to record user settings for a particular Remote Controller. Unlike all other buttons, switches and sticks on the Remote Controller, the custom buttons only send state to the Mobile Device and not the aircraft.

    Declaration

    Objective-C

    - (void)setRCCustomButton1Tag:(uint8_t)tag1
                 customButton2Tag:(uint8_t)tag2
                   withCompletion:(DJICompletionBlock)completion;

    Parameters

    tag1

    Button 1’s custom tag.

    tag2

    Button 2’s custom tag.

    completion

    Completion block.

  • Gets the custom button’s (Back Button’s) tags.

    Declaration

    Objective-C

    - (void)getRCCustomButtonTagWithCompletion:
        (void (^_Nonnull)(uint8_t, uint8_t, NSError *_Nullable))completion;
  • Set C1 button enable binding DJI GO app state. If it’s enabled, when the user presses the C1 button, an alertView will pop up and ask if you want to open the DJI GO app. This feature only supports MFI certificated Remote Controller.

    @attention This feature will affect the user of DJI GO app, we suggest you to call this interface to enable the C1 binding feature when your application enter background. Otherwise, the C1 button will be unbound with DJI GO app forever.

    Declaration

    Objective-C

    - (void)setRCC1ButtonBindingEnabled:(BOOL)enable
                         withCompletion:(DJICompletionBlock)completion;

    Parameters

    enable

    Enable C1 button bind DJI GO app.

    completion

    Completion block.

  • Gets the C1 button enable binding DJI Go app state. This feature only supports MFI certificated Remote Controller.

    Declaration

    Objective-C

    - (void)getRCC1ButtonBindingEnabledWithCompletion:
        (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;

    Parameters

    completion

    Completion block.

  • Query method to check if the Remote Controller supports master/slave mode. Master-slave mode is supported by the Inspire 1, Inspire 1 Pro, Matrice 100, Lightbridge 2 (including Matrice 600, Matrice 600 Pro, A3 and N3) and Inspire 2. Inspire 2 is using a new set of interfaces to control the master and slave connection. - Similar to other products, Inspire 2 uses set/get RemoteControllerMode to change the master/slave mode. - A slave remote controller can use getMastersWithCompletion: and joinMasterWithID:authorizationCode:withCompletion: to join a master remote controller. - A master remote controller can use setMasterAuthorizationCode:withCompletion: to change the authorization code.

    Declaration

    Objective-C

    - (BOOL)isMasterSlaveModeSupported;
  • Sets the Remote Controller’s mode. See the DJIRemoteControllerMode enum for all possible Remote Controller modes. It is supported by the Inspire 1, Inspire 1 Pro, Matrice 100, Lightbridge 2 (including Matrice 600, Matrice 600 Pro, A3 and N3) and Inspire 2.

    Declaration

    Objective-C

    - (void)setRemoteControllerMode:(DJIRemoteControllerMode)mode
                     withCompletion:(DJICompletionBlock)completion;

    Parameters

    mode

    Mode of type DJIRemoteControllerMode to be set for the Remote Controller.

    completion

    Completion block that receives setter result.

  • Gets the Remote Controller’s mode. It is supported by the Inspire 1, Inspire 1 Pro, Matrice 100, Lightbridge 2 (including Matrice 600, Matrice 600 Pro, A3 and N3) and Inspire 2.

    Declaration

    Objective-C

    - (void)getRemoteControllerModeWithCompletion:
        (void (^_Nonnull)(DJIRemoteControllerMode, BOOL,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Completion block that receives getter result.

  • Used by a slave Remote Controller to join a master Remote Controller. If the master Remote Controller accepts the request, the master Remote Controller will control the aircraft, and the slave Remote Controller will control the gimbal and/or be able to view the downlink video.

    Declaration

    Objective-C

    - (void)joinMasterWithID:(DJIRCID)masterId
                  masterName:(NSString *_Nonnull)masterName
              masterPassword:(NSString *_Nonnull)masterPassword
              withCompletion:(void (^_Nonnull)(DJIRCJoinMasterResult,
                                               NSError *_Nullable))completion;

    Parameters

    hostId

    Master’s unique identifier.

    name

    Master’s name.

    password

    Master’s password.

    completion

    Remote execution result callback block.

  • Returns the master Remote Controller’s information, which includes the unique identifier, name, and password.

    Declaration

    Objective-C

    - (void)getJoinedMasterNameAndPassword:
        (void (^_Nonnull)(DJIRCID, NSString *_Nullable, NSString *_Nullable,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Remote execution result callback block.

  • Starts a search by slave Remote Controller for nearby master Remote Controllers. To get the list of master Remote Controllers, first call getAvailableMastersWithCallbackBlock, then call stopMasterRCSearchWithCompletion to end the search.

    Declaration

    Objective-C

    - (void)startMasterRCSearchWithCompletion:(DJICompletionBlock)completion;

    Parameters

    completion

    Remote execution result callback block.

  • Returns all available master Remote Controllers that are located nearby. Before this method can be used, call startMasterRCSearchWithCompletion to start the search for master Remote Controllers. Once the list of masters is received, call stopMasterRCSearchWithCompletion to end the search.

    Declaration

    Objective-C

    - (void)getAvailableMastersWithCompletion:
        (void (^_Nonnull)(NSArray<DJIRCInfo *> *_Nullable,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Remote execution result callback block.

  • Used by a slave Remote Controller to stop the search for nearby master Remote Controllers.

    Declaration

    Objective-C

    - (void)stopMasterRCSearchWithCompletion:(DJICompletionBlock)completion;

    Parameters

    completion

    Remote execution result callback block.

  • Returns the state of the master Remote Controller search. The search is initiated by the Mobile Device, but performed by the Remote Controller. Therefore, if the Mobile Device’s application crashes while a search is ongoing, this method can be used to let the new instance of the application understand the Remote Controller state.

    Declaration

    Objective-C

    - (void)getMasterRCSearchStateWithCompletion:
        (void (^_Nonnull)(BOOL, NSError *_Nullable))completion;

    Parameters

    completion

    Remote execution result callback block.

  • Removes a master Remote Controller from the current slave Remote Controller.

    Declaration

    Objective-C

    - (void)removeMaster:(DJIRCID)masterId
          withCompletion:(DJICompletionBlock)completion;

    Parameters

    masterId

    The connected master’s identifier.

    completion

    Completion block.

  • Called by the slave Remote Controller to request gimbal control from the master Remote Controller.

    Declaration

    Objective-C

    - (void)requestGimbalControlRightWithCompletion:
        (void (^_Nonnull)(DJIRCRequestGimbalControlResult,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Remote execution result callback block.

  • Sets the Remote Contoller’s slave control mode.

    Declaration

    Objective-C

    - (void)setSlaveControlMode:(DJIRCControlMode)mode
                 withCompletion:(DJICompletionBlock)completion;

    Parameters

    mode

    Control mode to be set. the mode’s style should be RCSlaveControlStyleXXX.

    completion

    Completion block

  • Gets the Remote Controller’s slave control mode.

    Declaration

    Objective-C

    - (void)getSlaveControlModeWithCompletion:
        (void (^_Nonnull)(DJIRCControlMode, NSError *_Nullable))completion;

    Parameters

    completion

    Remote execution result callback block.

  • Called by the slave Remote Controller to set the gimbal’s pitch, roll, and yaw speed with a range of [0, 100].

    Declaration

    Objective-C

    - (void)setSlaveJoystickControlGimbalSpeed:(DJIRCGimbalControlSpeed)speed
                                withCompletion:(DJICompletionBlock)completion;

    Parameters

    speed

    Gimal’s pitch, roll, and yaw speed with a range of [0, 100].

    completion

    Completion block

  • Gets the current slave’s gimbal’s pitch, roll, and yaw speed with a range of [0, 100].

    Declaration

    Objective-C

    - (void)getSlaveJoystickControlGimbalSpeedWithCompletion:
        (void (^_Nonnull)(DJIRCGimbalControlSpeed, NSError *_Nullable))completion;

    Parameters

    completion

    Remote execution result callback block.

  • Used by the current master Remote Controller to get all the slaves connected to it.

    Declaration

    Objective-C

    - (void)getSlaveListWithCompletion:
        (void (^_Nonnull)(NSArray<DJIRCInfo *> *_Nullable,
                          NSError *_Nullable))block;

    Parameters

    block

    Remote execution result callback block. The arrray of slaves contains objects of type DJIRCInfo.

  • Removes a slave Remote Controller from the current master Remote Controller.

    Declaration

    Objective-C

    - (void)removeSlave:(DJIRCID)slaveId
         withCompletion:(DJICompletionBlock)completion;

    Parameters

    slaveId

    Target slave to be removed.

    completion

    Completion block.

  • When a slave Remote Controller requests a master Remote Controller to control the gimbal, this method is used by a master Remote Controller to respond to the slave Remote Controller’s request.

    Declaration

    Objective-C

    - (void)responseRequester:(DJIRCID)requesterId
        forGimbalControlRight:(BOOL)isAgree;

    Parameters

    requesterId

    The slave Remote Controller’s identifier.

    isAgree

    YES if the master Remote Controller agrees to give the slave Remote Controller the right to control the gimbal.

  • Sets the authorization code of a master remote controller. The slave remote controller needs to know the authorization code in order to join the master. A valid input is a string with 6 digits. The default value is 888888. It can only be called when the remote controller is in master mode. It is only supported by Inspire 2.

    Declaration

    Objective-C

    - (void)setMasterAuthorizationCode:(nonnull NSString *)authorizationCode
                        withCompletion:(DJICompletionBlock)completion;

    Parameters

    authorizationCode

    Authorization code to set.

    completion

    Completion block that receives the setter result.

  • Gets a list of the nearby remote controllers in master mode. It can only be called when the remote controller is in slave mode. It is only supported by Inspire 2.

    Declaration

    Objective-C

    - (void)getMastersWithCompletion:
        (void (^_Nonnull)(NSArray<NSString *> *_Nullable,
                          NSError *_Nullable))completion;

    Parameters

    completion

    Completion block that receives the getter results.

  • Joins the master remote controller with the specific ID. If the remote controller has joined the same master before, the authorization code is not required until the master remote controller changes its authorization code. In this case, code can be nil. It can only be called when the remote controller is in slave mode. It is only supported by Inspire 2.

    Declaration

    Objective-C

    - (void)joinMasterWithID:(NSString *_Nonnull)masterID
           authorizationCode:(NSString *_Nullable)code
              withCompletion:(void (^_Nonnull)(DJIRCJoinMasterResult,
                                               NSError *_Nullable))completion;

    Parameters

    masterID

    Master remote controller with the specific ID to join.

    code

    Authorization code of the master remote controller. @completion Completion block that receives the execution result.