DJIFlightController(VirtualStickControlMode)

@interface DJIFlightController (VirtualStickControlMode)

This class provides methods to manage Virtual Stick Control of the flight controller.

  • Indicates whether the virtual stick control interface can be used. If there is a mission running in the mission manager, this property will be NO.

    Declaration

    Objective-C

    - (BOOL)isVirtualStickControlModeAvailable;
  • Enables virtual stick control mode. By enabling virtual stick control mode, the aircraft can be controlled using the sendVirtualStickFlightControlData:withCompletion: method. It is not supported by Mavic Pro when using the WiFi connection.

    Declaration

    Objective-C

    - (void)enableVirtualStickControlModeWithCompletion:
        (DJICompletionBlock)completion;

    Parameters

    completion

    Completion block.

  • Disables virtual stick control mode. It is not supported by Mavic Pro when using the WiFi connection.

    Declaration

    Objective-C

    - (void)disableVirtualStickControlModeWithCompletion:
        (DJICompletionBlock)completion;

    Parameters

    completion

    Completion block.

  • Sends flight control data using virtual stick commands. The isVirtualStickControlModeAvailable property must be YES to use virtual stick commands. Virtual stick commands should be sent to the aircraft between 5 Hz and 25 Hz. If virtual stick commands are not sent frequently enough the aircraft may regard the connection as broken which will cause the aircraft to hover in place until the next command comes through.

    Declaration

    Objective-C

    - (void)sendVirtualStickFlightControlData:
                (DJIVirtualStickFlightControlData)controlData
                               withCompletion:(DJICompletionBlock)completion;

    Parameters

    controlData

    Flight control data.

    completion

    Completion block.