DJI Mobile SDK Documentation

      class UpgradeComponent

      class UpgradeComponent
      Package:dji.sdk.upgrade.component
      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, Matrice 300 RTK.

      Class Members:
      method getComponentType
      @Nullable
      UpgradeComponentType getComponentType()
      Package:dji.sdk.upgrade.component
      Description:

      Component to upgrade.

      Return:
      UpgradeComponentTypeAn enum value of UpgradeComponentType.
      method
      method getIndex
      int getIndex()
      Package:dji.sdk.upgrade.component
      Description:

      Returns the upgrade component index. Index is zero based. Please refer to getIndex to get the component index. For instance, if Matrice 300 RTK can have three gimbal mounted cameras, the three camera components are with indices 0, 1 and 4.

      Return:
      intAn int value of index.
      method getUpgradeState
      UpgradeFirmwareState getUpgradeState()
      Package:dji.sdk.upgrade.component
      Description:

      Current firmware upgrade state.

      Return:
      UpgradeFirmwareStateAn enum value of UpgradeFirmwareState.
      method getLatestFirmwareInformation
      @Nullable
      FirmwareInformation getLatestFirmwareInformation()
      Package:dji.sdk.upgrade.component
      Description:

      The latest firmware information.

      Return:
      FirmwareInformationAn enum value of FirmwareInformation.
      method addUpgradeFirmwareListener
      void addUpgradeFirmwareListener(@NonNull UpgradeFirmwareListener listener)
      Package:dji.sdk.upgrade.component
      Description:

      Adds a listener to receive the UpgradeFirmwareListener..

      Input Parameters:
      @NonNull UpgradeFirmwareListener listenerListener to receive the UpgradeFirmwareListener.. It is used to distinguish different listener and the listener will be retained.
      method removeUpgradeFirmwareListener
      void removeUpgradeFirmwareListener(@NonNull UpgradeFirmwareListener listener)
      Package:dji.sdk.upgrade.component
      Description:

      Removes a listener that is added by passing to addUpgradeFirmwareListener.

      Input Parameters:
      @NonNull UpgradeFirmwareListener listenerThe listener to remove.
      method removeAllUpgradeFirmwareListener
      void removeAllUpgradeFirmwareListener()
      Package:dji.sdk.upgrade.component
      Description:

      Remove all the listeners are added by passing to addUpgradeFirmwareListener.

      method canCancelConsistencyUpgrade
      boolean canCancelConsistencyUpgrade()
      Package:dji.sdk.upgrade.component
      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:
      booleanA boolean value.
      method startFirmwareConsistencyUpgrade
      void startFirmwareConsistencyUpgrade(CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.upgrade.component
      Description:

      Starts firmware consistency upgrade. If the firmware version of some modules in the device is not compatible with the firmware version of other modules, the firmware will send a request for consistent upgrade. After you start firmware consistency upgrade, You should Invoke onFirmwareUpgradeProgressUpdated to receive upgrade progress information. Before invoking this method, please make sure that the motors are turned off and getWiFiLink is not using. It is only supported by Mavic Air, Mavic 2 series.

      Input Parameters:
      CommonCallbacks.CompletionCallback callbackThe execution callback with the returned execution result.
      method stopFirmwareConsistencyUpgrade
      void stopFirmwareConsistencyUpgrade(@Nullable final CommonCallbacks.CompletionCallback callback)
      Package:dji.sdk.upgrade.component
      Description:

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

      Input Parameters:
      @Nullable final CommonCallbacks.CompletionCallback callbackThe execution callback with the returned execution result.
      enum UpgradeComponentType
      enum UpgradeComponentType
      Package:dji.sdk.upgrade.component.model
      Description:

      Upgrade component.

      Enum Members:
      REMOTE_CONTROLLERThe upgrade component is remote controller.
      AIRCRAFTThe upgrade component is aircraft.
      CAMERAThe upgrade component is camera.
      UNKNOWNThe upgrade component is unknown.
      Class Members:
      enum UpgradeFirmwareState
      enum UpgradeFirmwareState
      Package:dji.sdk.upgrade.component.model
      Description:

      Upgrade firmware state.

      Enum Members:
      INITIALIZINGInitializating.
      CHECKINGChecking firmware information.
      UP_TO_DATEFirmware version is up to date.
      UPGRADE_STRONGLY_RECOMMENDEDTo ensure flight safety, upgrade device is strongly recommended. Check DJI GO for available firmware updates. Find more details in FirmwareInformation.
      OPTIONAL_UPGRADE_AVAILABLEOptional upgrade is available. Check DJI GO for any available firmware updates.
      UNKNOWNUnknown.
      Class Members:
      enum UpgradingProgressState
      enum UpgradingProgressState
      Package:dji.sdk.upgrade.component.model
      Description:

      Device's firmware upgrading progress state.

      Enum Members:
      UPGRADINGUpgrading.
      UPGRADE_FAILEDUpgrade failed.
      UPGRADE_SUCCESSFULLYUpgrade Successfully.
      UNKNOWNUnknown.
      Class Members: