DJIGimbal
@interface DJIGimbal : DJIBaseComponent
This class provides multiple methods to control the gimbal. These include setting the gimbal work mode, rotating the gimbal with angle, starting the gimbal auto calibration, etc.
-
Returns the delegate of DJIGimbal.
Declaration
Objective-C
@property (readwrite, nonatomic) id<DJIGimbalDelegate> _Nullable delegate;
-
Returns the latest gimbal attitude data, or nil if none is available.
@deprecated Duplicated with the one in
DJIGimbalState
.Declaration
Objective-C
@property (readonly, nonatomic) DJIGimbalAttitude attitudeInDegrees;
-
Sets the completion time, in seconds, to complete an action to control the gimbal. If the method
rotateGimbalWithAngleMode:pitch:roll:yaw:withCompletion
is used to control the gimbal’s absolute angle,this property will be used to determine in what duration of time the gimbal should rotate to its new position. For example, if the value of this property is set to 2.0 seconds, the gimbal will rotate to its target position in 2.0 seconds. Range is [0.1, 25.5] seconds.Declaration
Objective-C
@property (assign, readwrite, nonatomic) double completionTimeForControlAngleAction;
-
Returns the gimbal’s features and possible range of settings. Each dictionary key is a possible gimbal feature and uses the DJIGimbalParam prefix. The value for each key is an instance of
DJIParamCapability
or its sub-classes. TheisSupported
property can be used to query if a feature is supported by the gimbal and themin
andmax
properties ofDJIParamCapabilityMinMax
can be used to query the valid range for the setting. When a feature is not supported, the values formin
andmax
are undefined.Declaration
Objective-C
@property (readonly, nonatomic) NSDictionary *_Nonnull gimbalCapability;
-
Sets the gimbal’s work mode. See enum
DJIGimbalWorkMode
for modes.Declaration
Objective-C
- (void)setGimbalWorkMode:(DJIGimbalWorkMode)workMode withCompletion:(DJICompletionBlock)block;
Parameters
workMode
Gimbal work mode to be set.
block
Remote execution result error block.
-
Rotate the gimbal’s pitch, roll, and yaw in Angle Mode. See
gimbalCapability
for which axes can be moved for the gimbal being used.Declaration
Objective-C
- (void)rotateGimbalWithAngleMode:(DJIGimbalRotateAngleMode)angleMode pitch:(DJIGimbalAngleRotation)pitch roll:(DJIGimbalAngleRotation)roll yaw:(DJIGimbalAngleRotation)yaw withCompletion:(DJICompletionBlock)block;
Parameters
pitch
Gimbal’s pitch rotation.
roll
Gimbal’s roll rotation.
yaw
Gimbal’s yaw rotation.
block
Execution result error block.
-
Rotate the gimbal’s pitch, roll, and yaw using speed. The direction can either be set to clockwise or counter-clockwise. See
gimbalCapability
for which axes can be moved for the gimbal being used.Declaration
Objective-C
- (void)rotateGimbalBySpeedWithPitch:(DJIGimbalSpeedRotation)pitch roll:(DJIGimbalSpeedRotation)roll yaw:(DJIGimbalSpeedRotation)yaw withCompletion:(DJICompletionBlock)block;
Parameters
pitch
Gimbal’s pitch rotation.
roll
Gimbal’s roll rotation.
yaw
Gimbal’s yaw rotation.
block
Execution result error block.
-
Resets the gimbal. The behaviors are product-dependent. Osmo series (e.g. Osmo, Osmo Pro): The gimbal’s pitch and yaw will be set to the origin, which is the standard position for the gimbal. Phantom series (e.g. Phantom 3 Professional, Phantom 4 series): The first call sets gimbal to point down vertically to the earth. The second call sets gimbal to the standard position. Other products (e.g. Inspire 1): Only the gimbal’s pitch will the set to the origin.
Declaration
Objective-C
- (void)resetGimbalWithCompletion:(DJICompletionBlock)block;
Parameters
block
Remote execution result error block.
-
Starts calibrating the gimbal. The product should be stationary (not flying, or being held) and horizontal during calibration. For gimbal’s with adjustable payloads, the payload should be present and balanced before doing a calibration.
Declaration
Objective-C
- (void)startGimbalAutoCalibrationWithCompletion:(DJICompletionBlock)block;
Parameters
block
Remote execution result error block.
-
The gimbal roll can be fine tuned with a custom offset. The range for the custom offset is [-2.0, 2.0] degrees. If the offset is negative, the gimbal will be fine tuned the specified number of degrees in the counterclockwise direction.
Declaration
Objective-C
- (void)fineTuneGimbalRollInDegrees:(float)offset withCompletion:(DJICompletionBlock)block;
Parameters
offset
Fine-tuned offset, in degrees, to be tuned.
block
Completion block.
-
Starts testing the balance of the gimbal payload. For gimbals that allow payloads to be changed, a balance test should be performed to ensure the camera is mounted correctly. The product should be stationary (not flying, or being held) and horizontal during testing. See
DJIGimbalState
for the test result. Only supported by Ronin-MX.Declaration
Objective-C
- (void)startGimbalBalanceTestWithCompletion:(DJICompletionBlock)block;
Parameters
block
Completion block that receives the execution result. The completion block will return when the balance test is successfully started.
-
Sets the advanced settings profile. The advanced settings profile has options for both preset and custom profiles for SmoothTrack and Controller settings. Settings for SmoothTrack and Controller can only be set manually when using a custom profile. Use
DJIGimbalParamAdvancedSettingsProfile
ingimbalCapability
to check if it is supported by the gimbal. Only supported by Osmo.Declaration
Objective-C
- (void)setAdvancedSettingsProfile:(DJIGimbalAdvancedSettingsProfile)profile withCompletion:(DJICompletionBlock)block;
Parameters
profile
Profile to set.
block
Completion block that receives the execution result.
-
Gets the advanced settings profile. Use
DJIGimbalParamAdvancedSettingsProfile
to check if it is supported by the gimbal. Only supported by Osmo.Declaration
Objective-C
- (void)getAdvancedSettingsProfileWithCompletion: (void (^_Nonnull)(DJIGimbalAdvancedSettingsProfile, NSError *_Nullable))block;
Parameters
block
Completion block that receives the execution result.
-
Restores the gimbal’s settings to factory settings.
Declaration
Objective-C
- (void)loadFactorySettings:(DJICompletionBlock)block;
Parameters
block
The completion block that receives execution result.
-
Extends the pitch range of gimbal. Currently, it is only supported by Phantom 3 Series, Phantom 4 and Phantom 4 Pro. If extended, the gimbal’s pitch control range can be [-30, 90], otherwise, it’s [0, 90]. Use
DJIGimbalParamPitchRangeExtension
to check if it is supported by the gimbal.Declaration
Objective-C
- (void)setPitchRangeExtensionEnabled:(BOOL)shouldExtend withCompletion:(DJICompletionBlock)block;
Parameters
shouldExtend
Whether the pitch range should be extended
block
The completion block that receives execution result.
-
Get the extend gimbal pitch range state. Use
DJIGimbalParamPitchRangeExtension
to check if it is supported by the gimbal.Declaration
Objective-C
- (void)getPitchRangeExtensionEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
shouldExtend
Whether the pitch range should be extended
block
The completion block that receives execution result.
-
Configures gimbal’s motor control with a preset configuration applicable for most popular cameras. In order to the optimize the performance, motor control tuning is still required.
Declaration
Objective-C
- (void)configureMotorControlWithPreset:(DJIGimbalMotorControlPreset)preset withCompletion:(DJICompletionBlock)block;
Parameters
preset
The preset configuration to set.
block
The completion block that receives execution result.
-
Sets the coefficient of speed error control. It can be seen as the coefficient for the proportional term in the PID controller. Use
DJIGimbalParamMotorControlStiffnessPitch
,DJIGimbalParamMotorControlStiffnessYaw
andDJIGimbalParamMotorControlStiffnessRoll
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless). Only supported by Ronin-MX.Declaration
Objective-C
- (void)setMotorControlStiffness:(NSInteger)stiffness onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
stiffness
The stiffness value to set.
axis
The axis that the setting is applied to.
block
The completion block that receives execution result.
-
Gets the coefficient of speed error control. It can be seen as the coefficient for the proportional term in the PID controller. Use
DJIGimbalParamMotorControlStiffnessPitch
,DJIGimbalParamMotorControlStiffnessYaw
andDJIGimbalParamMotorControlStiffnessRoll
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless). Only supported by Ronin-MX.Declaration
Objective-C
- (void)getMotorControlStiffnessOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets the coefficient of attitude accuracy control. It can be seen as the coefficient for the integral term in the PID controller. Use
DJIGimbalParamMotorControlStrengthPitch
,DJIGimbalParamMotorControlStrengthYaw
andDJIGimbalParamMotorControlStrengthRoll
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless). Only supported by Ronin-MX.Declaration
Objective-C
- (void)setMotorControlStrength:(NSInteger)strength onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
strength
The strength value to set.
axis
The axis that the setting is applied to.
block
The completion block that receives execution result.
-
Gets the coefficient of attitude accuracy control. It can be seen as the coefficient for the integral term in the PID controller. Use
DJIGimbalParamMotorControlStrengthPitch
,DJIGimbalParamMotorControlStrengthYaw
andDJIGimbalParamMotorControlStrengthRoll
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless). Only supported by Ronin-MX.Declaration
Objective-C
- (void)getMotorControlStrengthOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets the coefficient of denoising the output. Use
DJIGimbalParamMotorControlGyroFilteringPitch
,DJIGimbalParamMotorControlGyroFilteringYaw
andDJIGimbalParamMotorControlGyroFilteringRoll
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless). Only supported by Ronin-MX.Declaration
Objective-C
- (void)setMotorControlGyroFiltering:(NSInteger)filtering onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
filtering
The gyro filtering value to set.
axis
The axis that the setting is applied to.
block
The completion block that receives execution result.
-
Gets the coefficient of denoising the output. Use
DJIGimbalParamMotorControlGyroFilteringPitch
,DJIGimbalParamMotorControlGyroFilteringYaw
andDJIGimbalParamMotorControlGyroFilteringRoll
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless). Only supported by Ronin-MX.Declaration
Objective-C
- (void)getMotorControlGyroFilteringOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets the value for pre-adjust. It can be seen as the coefficient for the derivative term in the PID controller. Only supported by Ronin-MX. Use
DJIGimbalParamMotorControlPrecontrolPitch
,DJIGimbalParamMotorControlPrecontrolYaw
andDJIGimbalParamMotorControlPrecontrolRoll
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)setMotorControlPrecontrol:(NSInteger)precontrol onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
precontrol
The Precontrol value to set.
axis
The axis that the setting is applied to.
block
The completion block that receives execution result.
-
Gets the value for pre-adjust. It can be seen as the coefficient for the derivative term in the PID controller. Only supported by Ronin-MX. Use
DJIGimbalParamMotorControlPrecontrolPitch
,DJIGimbalParamMotorControlPrecontrolYaw
andDJIGimbalParamMotorControlPrecontrolRoll
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)getMotorControlPrecontrolOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets physical controller (e.g. the joystick on Osmo or the remote controller of the aircraft) deadband on an axis. A larger deadband requires more controller movement to start gimbal motion. Use
DJIGimbalParamControllerDeadbandYaw
andDJIGimbalParamControllerDeadbandPitch
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)setControllerDeadband:(NSInteger)deadband onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
deadband
The deadband value to be set.
axis
The axis that the setting will be applied to.
block
The completion block that receives execution result.
-
Gets physical controller deadband value on an axis. A larger deadband requires more controller movement to start gimbal motion. Use
DJIGimbalParamControllerDeadbandYaw
andDJIGimbalParamControllerDeadbandPitch
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)getControllerDeadbandOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets physical controller (e.g. the joystick on Osmo or the remote controller of the aircraft) speed on an axis. Speed setting controls the mapping between the movement of the controller and the gimbal speed. Use
DJIGimbalParamControllerSpeedYaw
andDJIGimbalParamControllerSpeedPitch
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)setControllerSpeed:(NSInteger)speed onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
speed
The speed value to be set.
axis
The axis that the setting will be applied to.
block
The completion block that receives execution result.
-
Gets physical controller speed value on an axis. Speed setting controls the mapping between the movement of the controller and the gimbal speed. Use
DJIGimbalParamControllerSpeedYaw
andDJIGimbalParamControllerSpeedPitch
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)getControllerSpeedOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets physical controller (e.g. the joystick on Osmo or the remote controller of the aircraft) smoothing on an axis. Smoothing controls the deceleration of the gimbal. Use
DJIGimbalParamControllerSmoothingYaw
andDJIGimbalParamControllerSmoothingPitch
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)setControllerSmoothing:(NSInteger)smoothing onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
smoothing
The smoothing value to be set.
axis
The axis that the setting will be applied to.
block
The completion block that receives execution result.
-
Gets physical controller smoothing value on an axis. Smoothing controls the deceleration of the gimbal. Use
DJIGimbalParamControllerSmoothingYaw
andDJIGimbalParamControllerSmoothingPitch
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)getControllerSmoothingOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Enables SmoothTrack for the axis. Only supported by Osmo. Ronin-MX supports SmoothTrack but it is always enabled for both pitch axis and yaw axis. Use
DJIGimbalParamSmoothTrackEnabledPitch
andDJIGimbalParamSmoothTrackEnabledYaw
withgimbalCapability
to check if the gimbal supports this feature.Declaration
Objective-C
- (void)setSmoothTrackEnabled:(BOOL)enabled onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
enabled
YES
to enable SmoothTrack on the axis.axis
The axis that the setting will be applied to.
block
The completion block that receives execution result.
-
Gets whether an axis has SmoothTrack enabled. Only supported by Osmo. Ronin-MX supports SmoothTrack but it is always enabled for both pitch axis and yaw axis. Use
DJIGimbalParamSmoothTrackEnabledPitch
andDJIGimbalParamSmoothTrackEnabledYaw
withgimbalCapability
to check if the gimbal supports this feature.Declaration
Objective-C
- (void)getSmoothTrackEnabledOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets gimbal SmoothTrack catch up speed on an axis. SmoothTrack speed determines how fast the gimbal will catch up with a large, translated handle movement. Use
DJIGimbalParamSmoothTrackSpeedPitch
andDJIGimbalParamSmoothTrackSpeedYaw
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)setSmoothTrackSpeed:(NSInteger)speed onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
speed
SmoothTrack speed [0,100].
axis
The axis that the setting will be applied to.
block
The completion block that receives execution result.
-
Gets gimbal SmoothTrack speed on an axis. SmoothTrack speed determines how fast the gimbal will catch up with a large, translated handle movement. Use
DJIGimbalParamSmoothTrackSpeedPitch
andDJIGimbalParamSmoothTrackSpeedYaw
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)getSmoothTrackSpeedOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets SmoothTrack deadband on an axis. A larger deadband requires more handle movement to translate into gimbal motion. Use
DJIGimbalParamSmoothTrackDeadbandPitch
andDJIGimbalParamSmoothTrackDeadbandYaw
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values in degrees.Declaration
Objective-C
- (void)setSmoothTrackDeadband:(NSInteger)deadband onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
deadband
SmoothTrack deadband [0,90].
axis
The axis that the setting will be applied to.
block
The completion block that receives execution result.
-
Gets SmoothTrack deadband on an axis. A larger deadband requires more handle movement to translate into gimbal motion. Use
DJIGimbalParamSmoothTrackDeadbandPitch
andDJIGimbalParamSmoothTrackDeadbandYaw
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values in degrees.Declaration
Objective-C
- (void)getSmoothTrackDeadbandOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Sets SmoothTrack acceleration on an axis. Acceleration determines how closely the camera will follow the translated yaw handle movement. Use
DJIGimbalParamSmoothTrackAccelerationPitch
andDJIGimbalParamSmoothTrackAccelerationYaw
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)setSmoothTrackAcceleration:(NSInteger)acceleration onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
acceleration
SmoothTrack acceleration [0,30].
axis
The axis that the setting will be applied to.
block
The completion block that receives execution result.
-
Gets SmoothTrack acceleration on an axis. Acceleration determines how closely the camera will follow the translated yaw handle movement. Use
DJIGimbalParamSmoothTrackAccelerationPitch
andDJIGimbalParamSmoothTrackAccelerationYaw
withgimbalCapability
to check if the gimbal supports this feature and the range of possible values (unitless).Declaration
Objective-C
- (void)getSmoothTrackAccelerationOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.
-
Endpoint settings determine the farthest points to which the gimbal will rotate during manual controller input. Only supported by Ronin-MX. Use
DJIGimbalParamEndpointPitchUp
,DJIGimbalParamEndpointPitchDown
,DJIGimbalParamEndpointYawLeft
andDJIGimbalParamEndpointYawRight
ingimbalCapability
to check if the gimbal supports this feature and what the valid range of enpoints are.Declaration
Objective-C
- (void)setEndpoint:(NSInteger)endpoint inDirection:(DJIGimbalEndpointDirection)direction withCompletion:(DJICompletionBlock)block;
Parameters
endpoint
The endpoint value to set.
direction
The endpoint direction.
block
The completion block that receives execution result.
-
Gets the farthest points to which the gimbal will rotate during manual controller input. Only supported by Ronin-MX. Use
DJIGimbalParamEndpointPitchUp
,DJIGimbalParamEndpointPitchDown
,DJIGimbalParamEndpointYawLeft
andDJIGimbalParamEndpointYawRight
withgimbalCapability
to check if the gimbal supports this feature.Declaration
Objective-C
- (void)getEndpointInDirection:(DJIGimbalEndpointDirection)direction withCompletion: (void (^_Nonnull)(NSInteger, NSError *_Nullable))block;
Parameters
direction
The endpoint direction.
block
The completion block that receives execution result.
-
Allows the camera to be mounted in the upright position (on top of the aircraft instead of underneath). Only supported by Ronin-MX.
Declaration
Objective-C
- (void)setCameraUprightEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
YES
to allow the camera to be upright.block
The completion block that receives execution result.
-
Gets if the camera is allowed to be in the upright position. Only supported by Ronin-MX.
Declaration
Objective-C
- (void)getCameraUprightEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
The completion block that receives execution result.
-
Turns on and off the gimbal motors.
NO
means the gimbal power remains on, however the motors will not work. Only supported by Ronin-MX.Declaration
Objective-C
- (void)setMotorEnabled:(BOOL)enabled withCompletion:(DJICompletionBlock)block;
Parameters
enabled
YES
to enable the motor.block
The completion block that receives execution result.
-
Gets if the gimbal motors are enabled to work or not. Only supported by Ronin-MX.
Declaration
Objective-C
- (void)getMotorEnabledWithCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
block
The completion block that receives execution result.
-
Resets gimbal position to selfie setup. If the gimbal yaw is not at 180 degrees, then calling this method will rotate the gimbal yaw to 180 degrees (effectively pointing the camera to the person holding the gimbal). If the gimbal yaw is at 180 degrees, then the gimbal will rotate in yaw to 0 degrees. Only supported by Osmo.
Declaration
Objective-C
- (void)toggleGimbalSelfieWithCompletion:(DJICompletionBlock)block;
Parameters
block
The completion block that receives execution result.
-
Sets the gimbal’s controller mode. The control mode for the gimbal controller (joystick for Osmo). The total controller deflection is a combination of horizontal and vertical deflection. This translates to gimbal movement around the yaw and pitch axes. The gimbal can be set to either move in both yaw and pitch simultaneously based on horizontal and vertical deflection of the controller, or move in only yaw or pitch exclusively based on whether horizontal or vertical deflection is larger. Only supported by Osmo.
Declaration
Objective-C
- (void)setGimbalControllerMode:(DJIGimbalControllerMode)controlMode withCompletion:(DJICompletionBlock)block;
Parameters
controlMode
The stick control mode to set.
block
The completion block that receives execution result.
-
Gets the gimbal’s controller mode. Only supported by Osmo.
Declaration
Objective-C
- (void)getGimbalControllerModeWithCompletion: (void (^_Nonnull)(DJIGimbalControllerMode, NSError *_Nullable))block;
Parameters
block
The completion block that receives execution result.
-
Inverts the physical control for gimbal movement on an axis. It is only supported by Osmo Mobile. The setting can only be applied to the pitch or yaw axis.
Declaration
Objective-C
- (void)setInvertControlEnabled:(BOOL)enabled onAxis:(DJIGimbalAxis)axis withCompletion:(DJICompletionBlock)block;
Parameters
enabled
YES
to enable inverted control.axis
The axis that the setting will be applied to.
block
The completion block that receives execution result.
-
Gets if the physical control is inverted for gimbal movement on an axis. It is only supported by Osmo Mobile. The setting can only be applied to the pitch or yaw axis.
Declaration
Objective-C
- (void)getInvertControlEnabledOnAxis:(DJIGimbalAxis)axis withCompletion: (void (^_Nonnull)(BOOL, NSError *_Nullable))block;
Parameters
axis
The axis to query.
block
The completion block that receives execution result.