DJI Mobile SDK Documentation

      class DJIUpgradeComponent

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

      This class is used to control components' upgrade. It also provides methods to receive firmware consistency upgrade state and the latest firmware version information. It is only supported by Mavic Air, Mavic 2 series.

      Class Members:
      property componentType
      @property (nonatomic, readonly) DJIUpgradeComponentType componentType
      Header:DJIUpgradeComponent.h
      Description:

      Component to upgrade.

      See Also:

      DJIUpgradeComponentType

      property
      property upgradeState
      @property (atomic, readonly) DJIUpgradeFirmwareState upgradeState
      Header:DJIUpgradeComponent.h
      Description:

      Current firmware upgrade state.

      See Also:

      DJIUpgradeFirmwareState

      property latestFirmwareInformation
      @property (nonatomic, readonly) DJIFirmwareInformation *latestFirmwareInformation
      Header:DJIUpgradeComponent.h
      Description:

      The latest firmware information.

      See Also:

      DJIFirmwareInformation

      method addUpgradeFirmwareListener:withQueue
      - (void)addUpgradeFirmwareListener:(id<DJIUpgradeFirmwareDelegate>)listener withQueue:(nullable dispatch_queue_t)queue
      Header:DJIUpgradeComponent.h
      Description:

      Adds a listener to receive the DJIUpgradeFirmwareDelegate.

      Input Parameters:
      id<DJIUpgradeFirmwareDelegate> listenerListener to receive the DJIUpgradeFirmwareDelegate. It is used to distinguish different listener and the listener will be retained.
      nullable dispatch_queue_t queueThe dispatch queue to process state. The main queue is used if it is nil.
      method removeUpgradeFirmwareListener
      - (void)removeUpgradeFirmwareListener:(id<DJIUpgradeFirmwareDelegate>)listener
      Header:DJIUpgradeComponent.h
      Description:

      Removes a listener that is added by passing to addUpgradeFirmwareListener:withQueue.

      Input Parameters:
      id<DJIUpgradeFirmwareDelegate> listenerThe listener to remove.
      method removeAllUpgradeFirmwareListener
      - (void)removeAllUpgradeFirmwareListener
      Header:DJIUpgradeComponent.h
      Description:

      Remove all the listeners are added by passing to addUpgradeFirmwareListener:withQueue.

      method canCancelConsistencyUpgrade
      - (BOOL)canCancelConsistencyUpgrade
      Header:DJIUpgradeComponent.h
      Description:

      Check if the consistency upgrade can be canceled. If false, please check the consistency of the firmware to ensure flight safety. It is only supported by Mavic Air, Mavic 2 series.

      Return:
      BOOLA boolean value.
      method startFirmwareConsistencyUpgradeWithCompletion
      - (void)startFirmwareConsistencyUpgradeWithCompletion:(DJICompletionBlock)completion
      Header:DJIUpgradeComponent.h
      Description:

      Starts firmware consistency upgrade. Invoke DJIUpgradeFirmwareDelegate_didUpdateFirmwareUpgradeProgress to receive upgrade progress information. Before invoking this method, please make sure that the motors are turned off and wifiLink is not using. It is only supported by Mavic Air, Mavic 2 series.

      Input Parameters:
      DJICompletionBlock completionCompletion block to receive the result.
      method stopFirmwareConsistencyUpgradeWithCompletion
      - (void)stopFirmwareConsistencyUpgradeWithCompletion:(DJICompletionBlock)completion
      Header:DJIUpgradeComponent.h
      Description:

      Cancels firmware consistency upgrade. DJIUpgradeFirmwareDelegate_didReceiveConsistencyUpgradeRequest will stop to notify. Before invoking this method, please make sure that the motors are turned off and wifiLink is not using. It is only supported by Mavic Air, Mavic 2 series.

      Input Parameters:
      DJICompletionBlock completionCompletion block to receive the result.
      State Updates
      protocol
      protocol DJIUpgradeFirmwareDelegate
      @protocol DJIUpgradeFirmwareDelegate <NSObject>
      Header:DJIUpgradeComponent.h
      Inherits From:NSObject
      Description:

      This protocol provides delegate methods to receive the upgrade information, the upgrade firmware state and the upgrade progress.

      Protocol Methods:

      Protocol Method

      method upgradeComponent:didUpdateUpgradeFirmwareState
      required
      - (void)upgradeComponent:(DJIUpgradeComponent *)component didUpdateUpgradeFirmwareState:(DJIUpgradeFirmwareState)state
      Header:DJIUpgradeComponent.h
      Description:

      Called when the upgrade firmware state has been changed.

      Input Parameters:
      DJIUpgradeComponent * componentThe upgrade component.
      DJIUpgradeFirmwareState stateThe upgrade firmware state.
      method upgradeComponent:didUpdateFirmwareUpgradeProgress
      required
      - (void)upgradeComponent:(DJIUpgradeComponent *)component didUpdateFirmwareUpgradeProgress:(DJIFirmwareUpgradeProgress *)progress
      Header:DJIUpgradeComponent.h
      Description:

      Called when the upgrade is in progress.

      Input Parameters:
      DJIUpgradeComponent * componentThe upgrade component.
      DJIFirmwareUpgradeProgress * progressThe upgrade progress information.
      method didReceiveConsistencyUpgradeRequest
      required
      - (void)didReceiveConsistencyUpgradeRequest:(DJIUpgradeComponent *)component
      Header:DJIUpgradeComponent.h
      Description:

      Raised when the firmware version is inconsistent among modules in component.
      See DJIUpgradeComponent. Invoke startFirmwareConsistencyUpgradeWithCompletion to start consistency upgrade.
      The update frequency is 1Hz.
      Stop to notify in following situation:
      - Firmware version among modules in component is consistent.
      - Firmware consistency upgrade stops.
      - DJIUpgradeComponent_cancelConsistencyUpgrade is invoked. Reboot the device to receive this notification again.

      Input Parameters:
      DJIUpgradeComponent * componentThe upgrade component.
      method upgradeComponent:didUpdateLatestFirmareInformation
      required
      - (void)upgradeComponent:(DJIUpgradeComponent *)component didUpdateLatestFirmareInformation:(DJIFirmwareInformation *)firmwareInformation
      Header:DJIUpgradeComponent.h
      Description:

      Updates the latest firmware version information when the user is logged in. Please use DJI GO to upgrade to the latest firmware.

      Input Parameters:
      DJIUpgradeComponent * componentThe upgrade component.
      DJIFirmwareInformation * firmwareInformationThe latest firmware information.
      enum DJIUpgradeComponentType
      typedef NS_ENUM(uint8_t, DJIUpgradeComponentType)
      Header:DJIUpgradeBaseTypes.h
      Description:

      Upgrade component.

      Enum Members:
      DJIUpgradeComponentTypeRemoteControllerThe upgrade component is remote controller.
      DJIUpgradeComponentTypeAircraftThe upgrade component is aircraft.
      DJIUpgradeComponentTypeUnknownThe upgrade component is unknown.
      enum DJIUpgradeFirmwareState
      typedef NS_ENUM(NSUInteger, DJIUpgradeFirmwareState)
      Header:DJIUpgradeBaseTypes.h
      Description:

      Upgrade firmware state.

      Enum Members:
      DJIUpgradeFirmwareStateInitializatingInitializating.
      DJIUpgradeFirmwareStateCheckingChecking firmware information.
      DJIUpgradeFirmwareStateUpToDateFirmware version is up to date.
      DJIUpgradeFirmwareStateUpgradeStronglyRecommendedTo ensure flight safety, upgrade device is strongly recommended. Check DJI GO for available firmware updates. Find more details in DJIFirmwareInformation.
      DJIUpgradeFirmwareStateOptionalUpgradeAvailableOptional upgrade is available. Check DJI GO for any available firmware updates.
      DJIUpgradeFirmwareStateUnknownUnknown.
      enum DJIUpgradingProgressState
      typedef NS_ENUM(uint8_t, DJIUpgradingProgressState)
      Header:DJIUpgradeBaseTypes.h
      Description:

      Device's firmware upgrading progress state.

      Enum Members:
      DJIUpgradingProgressStateUpgradingUpgrading.
      DJIUpgradingProgressStateUpgradeFailedUpgrade failed.
      DJIUpgradingProgressStateUpgradeSuccessfullyUpgrade Successfully.
      DJIUpgradingProgressStateUnknownUnknown.