# 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

###### method enableVirtualStick

    void enableVirtualStick(CommonCallbacks.CompletionCallback callback)

Package: | dji.v5.manager.interfaces

##### Description:

Open the virtual stick mode.

##### Input Parameters:

CommonCallbacks.CompletionCallback callback | Return the callback of execution result.

method
disableVirtualStick

###### method disableVirtualStick

    void disableVirtualStick(CommonCallbacks.CompletionCallback callback)

Package: | dji.v5.manager.interfaces

##### Description:

Close the virtual stick mode.

##### Input Parameters:

CommonCallbacks.CompletionCallback callback | Return the callback of execution result.

method
getLeftStick

###### 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:

IStick | Return the instance of left stick.

method
getRightStick

###### 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:

IStick | Return the instance of right stick.

method
setVirtualStickStateListener

###### method setVirtualStickStateListener

    void setVirtualStickStateListener(VirtualStickStateListener listener)

Package: | dji.v5.manager.interfaces

##### Description:

To set the listener of the virtual stick status.

##### Input Parameters:

VirtualStickStateListener listener | Listener of the virtual stick status

method
removeVirtualStickStateListener

###### method removeVirtualStickStateListener

    void removeVirtualStickStateListener(VirtualStickStateListener listener)

Package: | dji.v5.manager.interfaces

##### Description:

Move the listener of the virtual stick status.

##### Input Parameters:

VirtualStickStateListener listener | Listener of the virtual stick status

##### Related:

class
IStick
class
VirtualStickStateListener
enum
VirtualStickState

###### enum VirtualStickState

    enum VirtualStickState

Package: | dji.v5.manager.drone.virtualstick

##### Description:

Listener of the virtual stick status.

##### Enum Members:

VIRTUAL_STICK_ENABLED | Virtual stick function is opened.
VIRTUAL_STICK_DISABLED | Virtual stick function is closed.

##### Class Members:

×

## Search Mobile SDK Document

{{searchCount}} Results

- ### {{{(item.highlights && item.highlights.title) || item.title}}}

  {{{(item.highlights && item.highlights.content[0]) || item.title}}}

Load More
Loading...
Not Found