control

abstract fun control(@NonNull mode: MainGimbal.ControlMode, @Nullable yaw: Double, @Nullable pitch: Double, @Nullable roll: Double)

Controls the gimbal.

Unit of the yaw, pitch, roll values depends on the value of the mode parameter:

  • POSITION: axis value is in degrees and represents the desired position of the gimbal on the given axis.
  • VELOCITY: axis value is in max velocity (getMaxSpeed.getValue()) ratio (from -1 to 1).

If mode is POSITION, frame of reference of a given axis depends on the value of the stabilization on this axis. If this axis is stabilized (i.e. getStabilization.isEnabled()), the ABSOLUTE frame of reference is used. Otherwise, the RELATIVE frame of reference is used.

Parameters

mode

the mode that should be used to move the gimbal. This parameter will change the unit of the following parameters

yaw

target on the yaw axis, or null if you want to keep the current value

pitch

target on the pitch axis, or null if you want to keep the current value

roll

target on the roll axis, or null if you want to keep the current value