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
DJIHandheldControllerdelegate.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
modeThe 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.blockRemote execution result callback block.
-
Controls the LED of the handheld controller.
Declaration
Objective-C
- (void)controlLEDWithCommand:(nonnull DJIHandheldControllerLEDCommand *)command withCompletion:(DJICompletionBlock)block;Parameters
commandThe command to control the LED.
blockRemote 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
joystickVerticalDirectionandjoystickHorizontalDirection. It is only supported in firmware version 1.2.0.40 or above.Declaration
Objective-C
- (void)setStickGimbalControlEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;Parameters
enabledYESto enable the gimbal control.blockRemote 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
blockRemote execution result callback block.
View on GitHub
DJIHandheldController Class Reference