class DJITapFlyMissionOperator
@interface DJITapFlyMissionOperator : NSObject
Header: DJITapFlyMissionOperator.h Inherits From: NSObject
Description:
The operator for TapFly mission. It is used to execute a TapFly mission.
Class Members:
property currentState
@property (nonatomic , readonly ) DJITapFlyMissionState currentState
Header: DJITapFlyMissionOperator.h
Description:
The current state of the operator.
See Also:
DJITapFlyMissionState
property mode
@property (nonatomic , readonly ) DJITapFlyMode mode
Header: DJITapFlyMissionOperator.h
Description:
The current tracking mode of the aircraft. It is valid when the currentState
is one of the following: For the other states, the value is DJITapFlyModeUnknown
.
See Also:
DJITapFlyMode
property persistentError
@property (nonatomic , readonly , nullable ) NSError *persistentError
Header: DJITapFlyMissionOperator.h
Description:
Existing error that prevents a TapFly mission to start. If it is not nil
, currentState
will be DJITapFlyMissionStateCannotStart
.
method addListenerToEvents:withQueue:andBlock
-(void )addListenerToEvents:(id )listener withQueue:(dispatch_queue_t )queue andBlock:(DJITapFlyMissionOperatorEventBlock)block
Header: DJITapFlyMissionOperator.h
Description:
Adds listener to receive all the events of the TapFly mission operator.
id listener Listener that is interested in the TapFly mission operator. dispatch_queue_t queue The dispatch queue that block
will be called on. DJITapFlyMissionOperatorEventBlock block Block will be called when there is event updated.
method removeListener
-(void )removeListener:(id )listener
Header: DJITapFlyMissionOperator.h
Description:
Removes listener. The listener will not receive any updates after calling this method.
id listener Listener to be removed.
method removeAllListeners
-(void )removeAllListeners
Header: DJITapFlyMissionOperator.h
Description:
Remove all listeners.
method stopMissionWithCompletion
-(void )stopMissionWithCompletion:(DJICompletionBlock)completion
Header: DJITapFlyMissionOperator.h
Description:
Stops the executing mission. It can only be called when the currentState
is one of the following: After a mission is stopped successfully, currentState
will become DJITapFlyMissionStateReadyToStart
.
DJICompletionBlock completion Completion block that will be called when the operator succeeds or fails to start the execution. If it fails, an error will be returned.
method resetHeadingWithCompletion
-(void )resetHeadingWithCompletion:(DJICompletionBlock)completion
Header: DJITapFlyMissionOperator.h
Description:
Resets aircraft heading to the flight direction. It can only be used when mode
is DJITapFlyModeFree
.
method setAutoFlightSpeed:withCompletion
-(void )setAutoFlightSpeed:(float )speed withCompletion:(DJICompletionBlock)completion
Header: DJITapFlyMissionOperator.h
Description:
Sets auto flight speed for TapFly mission. It can be changed before or during the execution of a TapFly mission.
float speed Auto flight speed. DJICompletionBlock completion Completion block that receives the execution result.
method getAutoFlightSpeedWithCompletion
-(void )getAutoFlightSpeedWithCompletion:(DJIFloatCompletionBlock)completion
Header: DJITapFlyMissionOperator.h
Description:
Gets the auto flight speed for TapFly mission in m/s.
DJIFloatCompletionBlock completion Completion block that receives the execution result.
Horizontal Obstacle
method
method setHorizontalObstacleBypassEnabled:withCompletion
-(void )setHorizontalObstacleBypassEnabled:(BOOL )enabled withCompletion:(DJICompletionBlock)completion
Header: DJITapFlyMissionOperator.h
Description:
YES
allows the aircraft to bypass or move around an obstacle by going to the left or right of the obstacle. If NO
, the aircraft will only go over an obstacle to avoid it. It can be changed before or during the execution of a TapFly mission.
BOOL enabled YES
allows aircraft to bypass or move around an obstacle by going to the left or right.DJICompletionBlock completion Completion block that receives the execution result.
method getHorizontalObstacleBypassEnabledWithCompletion
-(void )getHorizontalObstacleBypassEnabledWithCompletion:(DJIBooleanCompletionBlock)completion
Header: DJITapFlyMissionOperator.h
Description:
YES
allows the aircraft to bypass or move around an obstacle by going to the left or right of the obstacle. If NO
, the aircraft will only go over an obstacle to avoid it. It can be changed before or during the execution of a TapFly mission.
DJIBooleanCompletionBlock completion Completion block that receives the execution result.
typedef block DJITapFlyMissionOperatorEventBlock
typedef void (^DJITapFlyMissionOperatorEventBlock)(DJITapFlyMissionEvent *event)
Header: DJITapFlyMissionOperator.h
Description:
Block to receive the Tap Fly operator event.