DJI Mobile SDK Documentation

      class IVirtualStickManager

      interface IVirtualStickManager
      Package:dji.v5.manager.interfaces
      Description:

      Class that is used to manage virtual stick. It is used to enable/disable the virtual stick mode. It also provides the ability to set/get/listen the virtual stick values.

      Class Members:
      method enableVirtualStick
      void enableVirtualStick(CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Open the virtual stick mode.

      Input Parameters:
      CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method disableVirtualStick
      void disableVirtualStick(CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Close the virtual stick mode.

      Input Parameters:
      CommonCallbacks.CompletionCallback callbackReturn the callback of execution result.
      method getLeftStick
      IStick getLeftStick()
      Package:dji.v5.manager.interfaces
      Description:

      To get the left stick instance of the virtual stick. Left stick controls the yaw axis and throttle of the aircraft.

      • When the sitck moves left, the horizontalPosition is negative. The aircraft will rotate counterclockwise when looking down at the aircraft.
      • When the sitck moves right, the horizontalPosition is positive. The aircraft will rotate clockwise when looking down at the aircraft.
      • When the sitck moves upward, the verticalPosition is positive. The aircraft will increase its altitude.
      • When the sitck moves downward, the verticalPosition is negative. The aircraft will lower its altitude.

      Return:
      IStickReturn the instance of left stick.
      method getRightStick
      IStick getRightStick()
      Package:dji.v5.manager.interfaces
      Description:

      To get the right stick instance of the virtual stick. Right stick controls the roll axis and pitch axis of the aircraft.

      • When the sitck moves left, the horizontalPosition is negative. The aircraft will fly left when looking down at the aircraft.
      • When the sitck moves right, the horizontalPosition is positive. The aircraft will fly right when looking down at the aircraft.
      • When the sitck moves upward, the verticalPosition is positive. The aircraft will fly forward when looking down at the aircraft.
      • When the sitck moves downward, the verticalPosition is negative. The aircraft will fly backward when looking down at the aircraft.

      Return:
      IStickReturn the instance of right stick.
      method setVirtualStickStateListener
      void setVirtualStickStateListener(VirtualStickStateListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      To set the listener of the virtual stick status.

      Input Parameters:
      VirtualStickStateListener listenerListener of the virtual stick status
      method removeVirtualStickStateListener
      void removeVirtualStickStateListener(VirtualStickStateListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Move the listener of the virtual stick status.

      Input Parameters:
      VirtualStickStateListener listenerListener of the virtual stick status
      class
      enum VirtualStickState
      enum VirtualStickState
      Package:dji.v5.manager.drone.virtualstick
      Description:

      Listener of the virtual stick status.

      Enum Members:
      VIRTUAL_STICK_ENABLEDVirtual stick function is opened.
      VIRTUAL_STICK_DISABLEDVirtual stick function is closed.
      Class Members: