DJI Mobile SDK Documentation

      class DUXPreflightChecklistManager

      @interface DUXPreflightChecklistManager : NSObject <DUXObjectProtocol>
      Header:DUXPreflightChecklistManager.h
      Inherits From:NSObject
      Description:

      The preflight checklist manager class manages the life-cycle of preflight checklist items, triggers their monitoring activity, and collects their states in order to produce a decision on whether or not it is advisable to take off. It is not a UI object, but can be used to produce a preflight checklist UI.

      Class Members:
      class method
      class method defaultManager
      + (nonnull instancetype)defaultManager
      Header:DUXPreflightChecklistManager.h
      Description:

      This instance will be prepopulated with a default set of checklist items.

      Return:
      nonnull instancetypeThe default configured instance.
      property preferredCameraIndex
      @property (nonatomic, assign) NSInteger preferredCameraIndex
      Header:DUXPreflightChecklistManager.h
      Description:

      If an item in preflight checklist manager can update it's preferredCameraIndex setting this will update all items to this index. Default value is 0.

      protocol DUXPreflightChecklistManagerListener
      @protocol DUXPreflightChecklistManagerListener <NSObject>
      Header:DUXPreflightChecklistManager.h
      Inherits From:NSObject
      Description:

      Defines the communication between the ChecklistManager and the listeners

      Protocol Methods:
      method preflightChecklistManager:noticedChangesForItem
      required
      - (void)preflightChecklistManager:(nonnull DUXPreflightChecklistManager *)manager noticedChangesForItem:(nonnull DUXPreflightChecklistItem *)item
      Header:DUXPreflightChecklistManager.h
      Description:

      Called when an item changes.

      Input Parameters:
      nonnull DUXPreflightChecklistItem * itemthe preflight checklist item
      nonnull DUXPreflightChecklistManager * managerthe preflicht checklist manager
      enum DUXPreflightChecklistState
      typedef NS_ENUM(NSInteger, DUXPreflightChecklistState)
      Header:DUXPreflightChecklistManager.h
      Description:

      State that each item will report.

      Enum Members:
      DUXPreflightChecklistSafeStateSafe.
      DUXPreflightChecklistWarningStateWarning.
      DUXPreflightChecklistErrorStateError.
      DUXPreflightChecklistPendingStatePending.
      property
      property isReadyToFly
      @property (nonatomic) BOOL isReadyToFly
      Header:DUXPreflightChecklistManager.h
      Description:

      Preflight checklist is ready to fly.

      property
      property overallState
      @property (nonatomic, readonly) DUXPreflightChecklistState overallState
      Header:DUXPreflightChecklistManager.h
      Description:

      Aggregated state of all the items.

      See Also:

      DUXPreflightChecklistState

      property preFlightChecklistItems
      @property (nonatomic, readonly, nonnull) NSArray <DUXPreflightChecklistItem *> *preFlightChecklistItems
      Header:DUXPreflightChecklistManager.h
      Description:

      Array of the items in the preflight checklist manager

      See Also:

      DUXPreflightChecklistItem

      method addChecklistItem
      - (void)addChecklistItem:(nullable DUXPreflightChecklistItem *)item
      Header:DUXPreflightChecklistManager.h
      Description:

      Add a preflight checklist item to the manager.

      Input Parameters:
      nullable DUXPreflightChecklistItem * itemThe item being added to the checklist
      method insertChecklistItem:afterChecklistItem
      - (void)insertChecklistItem:(nullable DUXPreflightChecklistItem *)itemToInsert afterChecklistItem:(nullable DUXPreflightChecklistItem *)itemToInsertAfter
      Header:DUXPreflightChecklistManager.h
      Description:

      Add a preflight checklist item to the manager after another pre flight checklist item already in the list.

      Input Parameters:
      nullable DUXPreflightChecklistItem * itemToInsertThe item being added to the checklist
      nullable DUXPreflightChecklistItem * itemToInsertAfterThe item in the checklist to insert after
      method insertCheckListItem:beforeChecklistItem
      - (void)insertCheckListItem:(nullable DUXPreflightChecklistItem *)itemToInsert beforeChecklistItem:(nullable DUXPreflightChecklistItem *)itemToInsertBefore
      Header:DUXPreflightChecklistManager.h
      Description:

      Add a preflight checklist item to the manager before another pre flight checklist item already in the list.

      Input Parameters:
      nullable DUXPreflightChecklistItem * itemToInsertThe item being added to the checklist
      nullable DUXPreflightChecklistItem * itemToInsertBeforeThe item in the checklist to insert before
      method removeChecklistItem
      - (void)removeChecklistItem:(nullable DUXPreflightChecklistItem *)item
      Header:DUXPreflightChecklistManager.h
      Description:

      Remove a preflight checklist item from the manager.

      Input Parameters:
      nullable DUXPreflightChecklistItem * itemThe item being removed from the checklist
      method checkListItemCount
      - (NSInteger)checkListItemCount
      Header:DUXPreflightChecklistManager.h
      Description:

      Number of items in the preflight checklist.

      Return:
      NSIntegerThe number of items
      method checklistItemAtIndex
      - (nullable DUXPreflightChecklistItem *)checklistItemAtIndex:(NSInteger)index
      Header:DUXPreflightChecklistManager.h
      Description:

      Returns the preflight checklist item at an index.

      Input Parameters:
      NSInteger indexIndex of desired checklist item.
      Return:
      nullable DUXPreflightChecklistItem *the preflight checklist item at an index
      method startCheckingList
      - (void)startCheckingList
      Header:DUXPreflightChecklistManager.h
      Description:

      When you are ready to show the check list, call this method to start activating the logic of each checklist item.

      method stopCheckingList
      - (void)stopCheckingList
      Header:DUXPreflightChecklistManager.h
      Description:

      When you are done with the checklist don't forget to call stopCheckingList.

      method item:didChangeState:didChangeDescription
      - (void)item:(nonnull DUXPreflightChecklistItem *)item didChangeState:(BOOL)didChangeState didChangeDescription:(BOOL)didChangeDescription
      Header:DUXPreflightChecklistManager.h
      Description:

      Method that responds to changes in an item.

      Input Parameters:
      nonnull DUXPreflightChecklistItem * itemThe item that changed.
      BOOL didChangeStateWhether the item state changed.
      BOOL didChangeDescriptionWhether the item description changed.
      method addListener
      - (void)addListener:(nullable id <DUXPreflightChecklistManagerListener>)listener
      Header:DUXPreflightChecklistManager.h
      Description:

      Adds a listener.

      Input Parameters:
      nullable id <DUXPreflightChecklistManagerListener> listenerThe listener being added.
      method removeListener
      - (void)removeListener:(nullable id <DUXPreflightChecklistManagerListener>)listener
      Header:DUXPreflightChecklistManager.h
      Description:

      Removes a listener.

      Input Parameters:
      nullable id <DUXPreflightChecklistManagerListener> listenerThe listener being removed.