DJIHandheldController

@interface DJIHandheldController : DJIBaseComponent

This class contains interfaces to control a handheld device. You can make the handheld device enter sleep mode, awake from sleep mode or shut it down.

  • Returns the DJIHandheldController delegate.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<DJIHandheldControllerDelegate> _Nullable delegate;
  • Set the power mode for the handheld.

    Declaration

    Objective-C

    - (void)setHandheldPowerMode:(DJIHandheldPowerMode)mode
                  withCompletion:(DJICompletionBlock)block;

    Parameters

    mode

    The power mode to set. CAUTION: When the mode is DJIHandheldPowerModePowerOff, the handheld device will be shut down and the connection will be broken. The user must then power on the device manually.

    block

    Remote execution result callback block.

  • Controls the LED of the handheld controller.

    Declaration

    Objective-C

    - (void)controlLEDWithCommand:(nonnull DJIHandheldControllerLEDCommand *)command
                   withCompletion:(DJICompletionBlock)block;

    Parameters

    command

    The command to control the LED.

    block

    Remote execution result callback block.

  • Enables/disables joystick control of the gimbal. By default, it is enabled. The handheld will be reset to the default value when it reboots or SDK reinitializes. When gimbal control is disabled, the joystick can be used for other purposes in an SDK application by reading its position values with joystickVerticalDirection and joystickHorizontalDirection. It is only supported in firmware version 1.2.0.40 or above.

    Declaration

    Objective-C

    - (void)setStickGimbalControlEnabled:(BOOL)enabled
                          withCompletion:(DJICompletionBlock)block;

    Parameters

    enabled

    YES to enable the gimbal control.

    block

    Remote execution result callback block.

  • Gets if the gimbal control with the joystick is enabled or not. It is only supported in firmware version 1.2.0.40 or above.

    Declaration

    Objective-C

    - (void)getStickGimbalControlEnabledWithCompletion:
        (nonnull void (^)(BOOL, NSError *_Nullable))block;

    Parameters

    block

    Remote execution result callback block.