DJI Mobile SDK Documentation

      class TapFlyMissionOperator

      class TapFlyMissionOperator implements DJIParamAccessListener
      Package:dji.sdk.mission.tapfly
      Description:

      The operator for TapFly mission. It is used to execute a TapFly mission.

      Class Members:
      Add Listener
      method
      method addListener
      void addListener(@NonNull TapFlyMissionOperatorListener listener)
      Package:dji.sdk.mission.tapfly
      Description:

      Add a listener to listen for all events in the TapFly mission operator.

      Input Parameters:
      @NonNull TapFlyMissionOperatorListener listenerListener that is interested in the TapFly mission operator.
      Remove Listener
      method
      method removeListener
      void removeListener(@NonNull TapFlyMissionOperatorListener targetListener)
      Package:dji.sdk.mission.tapfly
      Description:

      Removes listener. The listener will not receive any updates after calling this method.

      Input Parameters:
      @NonNull TapFlyMissionOperatorListener targetListenerListener to be removed.
      method removeAllListeners
      void removeAllListeners()
      Package:dji.sdk.mission.tapfly
      Description:

      Remove all listeners.

      Setup Environment
      method
      method setupEnvironment
      void setupEnvironment(@Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.mission.tapfly
      Description:

      Setup environment and provide result in callback

      Input Parameters:
      @Nullable CommonCallbacks.CompletionCallback callbackThe execution callback with the returned execution result.
      Start Mission
      method
      method startMission
      void startMission(@NonNull TapFlyMission mission, @Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.mission.tapfly
      Description:

      Starts to execute a TapFly mission. It can only be called when the getCurrentState is EXECUTION_STARTING. If the mission is started successfully, the getCurrentState will become EXECUTING.

      Input Parameters:
      @NonNull TapFlyMission missionAn object of TapFlyMission.
      @Nullable CommonCallbacks.CompletionCallback callbackThe execution callback with the returned execution result.
      Stop Mission
      method
      method stopMission
      void stopMission(@Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.mission.tapfly
      Description:

      Stops the executing mission. It can only be called when the getCurrentState is one of the following:

      After a mission is stopped successfully, getCurrentState will become EXECUTION_STARTING.

      Input Parameters:
      @Nullable CommonCallbacks.CompletionCallback callbackThe execution callback with the returned execution result.
      Reset Heading
      method
      method resetHeading
      void resetHeading(@Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.mission.tapfly
      Description:

      Resets aircraft heading to the flight direction. It can only be used when tapFlyMode is FREE.

      Input Parameters:
      @Nullable CommonCallbacks.CompletionCallback callbackThe execution callback with the returned execution result.
      Auto Flight Speed
      method
      method setAutoFlightSpeed
      void setAutoFlightSpeed(float speed, @Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.mission.tapfly
      Description:

      Sets auto flight speed for TapFly mission. It can be changed before or during the execution of a TapFly mission.

      Input Parameters:
      float speedAuto flight speed.
      @Nullable CommonCallbacks.CompletionCallback callbackThe execution callback with the returned execution result.
      method getAutoFlightSpeed
      void getAutoFlightSpeed(@NonNull CommonCallbacks.CompletionCallbackWith callback)
      Package:dji.sdk.mission.tapfly
      Description:

      Gets the auto flight speed for TapFly mission in m/s.

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallbackWith callbackThe execution callback with the returned execution result.
      Horizontal Obstacle
      method
      method setHorizontalObstacleBypassEnabled
      void setHorizontalObstacleBypassEnabled(boolean enabled,
      @Nullable CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.mission.tapfly
      Description:

      true allows the aircraft to bypass or move around an obstacle by going to the left or right of the obstacle. If false, the aircraft will only go over an obstacle to avoid it. It can be changed before or during the execution of a TapFly mission.

      Input Parameters:
      boolean enabledtrue allows aircraft to bypass or move around an obstacle by going to the left or right.
      @Nullable CommonCallbacks.CompletionCallback callbackThe execution callback with the returned execution result.
      method getHorizontalObstacleBypassEnabled
      void getHorizontalObstacleBypassEnabled(@NonNull CommonCallbacks.CompletionCallbackWith callback)
      Package:dji.sdk.mission.tapfly
      Description:

      true allows the aircraft to bypass or move around an obstacle by going to the left or right of the obstacle. If false, the aircraft will only go over an obstacle to avoid it. It can be changed before or during the execution of a TapFly mission.

      Input Parameters:
      @NonNull CommonCallbacks.CompletionCallbackWith callbackThe execution callback with the returned execution result.
      Tap Fly Mode
      method
      method getTapFlyMode
      TapFlyMode getTapFlyMode()
      Package:dji.sdk.mission.tapfly
      Description:

      Get the current tracking mode of the aircraft. It is valid when the TapFlyMissionState is one of the following:
      - EXECUTING
      - EXECUTION_PAUSED
      - EXECUTION_RESETTING
      For the other states, the value is UNKNOWN.

      Return:
      TapFlyModeAn enum value of TapFlyMode.