DJI Mobile SDK Documentation

      class DJIFollowMeMissionOperator

      @interface DJIFollowMeMissionOperator : NSObject
      Header:DJIFollowMeMissionOperator.h
      Inherits From:NSObject
      Description:

      The follow me mission operator is the only object that controls, runs and monitors FollowMe Missions. It can be accessed from DJIMissionControl.

      Class Members:
      Current State
      property
      property currentState
      @property (readonly, nonatomic) DJIFollowMeMissionState currentState
      Header:DJIFollowMeMissionOperator.h
      Description:

      The current state of the executing Follow Me mission.

      See Also:

      DJIFollowMeMissionState

      method addListenerToEvents:withQueue:andBlock
      - (void)addListenerToEvents:(id)listener
      withQueue:(nullable dispatch_queue_t)queue
      andBlock:(DJIFollowMeMissionOperatorEventBlock)block
      Header:DJIFollowMeMissionOperator.h
      Description:

      Adds a listener object to the listener pool that will listen to all events.

      Input Parameters:
      id listenerA listener object.
      nullable dispatch_queue_t queueThe dispatch queue that block will be called on.
      DJIFollowMeMissionOperatorEventBlock blockA DJIFollowMeMissionOperatorEventBlock block.
      method addListenerToStarted:withQueue:andBlock
      - (void)addListenerToStarted:(id)listener
      withQueue:(nullable dispatch_queue_t)queue
      andBlock:(DJIFollowMeMissionOperatorSimpleEventBlock)block
      Header:DJIFollowMeMissionOperator.h
      Description:

      Adds listener to receive the notification when a Follow Me mission is started.

      Input Parameters:
      id listenerListener that will listen for mission start.
      nullable dispatch_queue_t queueThe dispatch queue that block will be called on.
      DJIFollowMeMissionOperatorSimpleEventBlock blockBlock to be called when mission starts.
      method addListenerToFinished:withQueue:andBlock
      - (void)addListenerToFinished:(id)listener
      withQueue:(nullable dispatch_queue_t)queue
      andBlock:(DJICompletionBlock)block
      Header:DJIFollowMeMissionOperator.h
      Description:

      Adds listener to receive the notification when a Follow Me mission has finished.

      Input Parameters:
      id listenerListener that will listen for mission end.
      nullable dispatch_queue_t queueThe dispatch queue that block will be called on.
      DJICompletionBlock blockBlock to be called when mission ends. If the mission is interrupted with an error, the error will be passed to the block.
      Remove Listener
      method
      method removeListener
      - (void)removeListener:(id)listener
      Header:DJIFollowMeMissionOperator.h
      Description:

      Removes listener. If the listener is listening to more than one event, it will be removed from listening for all events.

      Input Parameters:
      id listenerListener to be removed.
      method removeListenerOfEvents
      - (void)removeListenerOfEvents:(id)listener
      Header:DJIFollowMeMissionOperator.h
      Description:

      Removes listener from listener pool for specific event.

      Input Parameters:
      id listenerListener to be removed.
      method removeListenerOfStarted
      - (void)removeListenerOfStarted:(id)listener
      Header:DJIFollowMeMissionOperator.h
      Description:

      Removes listener from listener pool for specific start mission events.

      Input Parameters:
      id listenerListener to be removed.
      method removeListenerOfFinished
      - (void)removeListenerOfFinished:(id)listener
      Header:DJIFollowMeMissionOperator.h
      Description:

      Removes listener from listener pool for specific finish mission events.

      Input Parameters:
      id listenerListener to be removed.
      method removeAllListeners
      - (void)removeAllListeners
      Header:DJIFollowMeMissionOperator.h
      Description:

      Remove all listeners.

      Start Mission
      method
      method startMission:withCompletion
      - (void)startMission:(DJIFollowMeMission *)mission withCompletion:(DJICompletionBlock)completion
      Header:DJIFollowMeMissionOperator.h
      Description:

      Starts to execute a Follow Me mission. It can only be called when the currentState is DJIFollowMeMissionStateReadyToStart. After a mission is started successfully, the currentState will become DJIFollowMeMissionStateExecuting.

      Input Parameters:
      DJIFollowMeMission * missionAn object of DJIFollowMeMission.
      DJICompletionBlock completionCompletion block that will be called when the operator succeeds or fails to start the execution. If it fails, an error will be returned.
      Stop Mission
      method
      method stopMissionWithCompletion
      - (void)stopMissionWithCompletion:(DJICompletionBlock)completion
      Header:DJIFollowMeMissionOperator.h
      Description:

      Stops the executing mission. It can only be called when the currentState is DJIFollowMeMissionStateExecuting. After a mission is stopped successfully, currentState will become DJIFollowMeMissionStateReadyToStart.

      Input Parameters:
      DJICompletionBlock completionThe completion block of DJICompletionBlock.
      method updateFollowMeCoordinate
      -(nullable NSError *)updateFollowMeCoordinate:(CLLocationCoordinate2D)coordinate
      Header:DJIFollowMeMissionOperator.h
      Description:

      Update the Follow Me mission's target location to follow.

      Input Parameters:
      CLLocationCoordinate2D coordinateA CLLocationCoordinate2D struct of the following target.
      Return:
      nullable NSError *The possible error if the functionality fails.
      method followMeCoordinate
      -(CLLocationCoordinate2D)followMeCoordinate
      Header:DJIFollowMeMissionOperator.h
      Description:

      The latest Follow Me coordinate. The operator will send the updated Follow Me coordinate to the aircraft at a fixed frequency in order to maintain the mission heart-beat. The value is only valid when the currentState is DJIFollowMeMissionStateExecuting.

      Return:
      CLLocationCoordinate2DThe latest Follow Me mission target location.
      typedef block DJIFollowMeMissionOperatorEventBlock
      typedef void (^DJIFollowMeMissionOperatorEventBlock)(DJIFollowMeMissionEvent *event)
      Header:DJIFollowMeMissionOperator.h
      Description:

      Block to receive the Follow Me operator event.

      Input Parameters:
      DJIFollowMeMissionEvent * eventThe Follow Me operator event with the state change.
      typedef block DJIFollowMeMissionOperatorSimpleEventBlock
      typedef void (^DJIFollowMeMissionOperatorSimpleEventBlock)()
      Header:DJIFollowMeMissionOperator.h
      Description:

      An simple event block for follow me mission.