DJI Mobile SDK Documentation

      class DJIBatteryError

      @EXClassNullAway
      class DJIBatteryError extends DJIError
      Package:dji.common.error
      Inherits From:DJIError
      Description:

      Defines all battery related errors.

      Class Members:
      final GET_SMART_BATTERY_INFO_FAILED
      static final DJIBatteryError GET_SMART_BATTERY_INFO_FAILED =
      truenew DJIBatteryError("Get smart battery info failed")
      Package:dji.common.error
      Description:

      Get smart battery failure information. This error is returned by functions when retrieving failure information for the DJIPhantomBattery and DJIAircraftBattery, including:
      public void getSmartBatteryRestTimeForAll(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryNeedTimeForGoHome(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryNeedTimeForLand(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryGohomeBatteryLevel(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryLandBatteryLevel(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryRadiusForGohome(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryRequestGohomeFlag(DJISmartBatteryExecuteResultCallback mCallBack)

      final UPDATE_WRONG
      static final DJIBatteryError UPDATE_WRONG = new DJIBatteryError("Update error")
      Package:dji.common.error
      Description:

      The update process is wrong.

      Inherited Methods:
      dji.common.error.DJIError
      method
      method getDJIError
      static DJIError getDJIError(int errorCode)
      Package:dji.common.error
      Description:

      Returns the specific error in the DJIFlightHubError according to the error code.

      Input Parameters:
      int errorCodeerrorCode for DJIFlightHubError.
      Return:
      static DJIErrorAn NSError object initialized with errorCode. If the errorCode was 0, returns nil.
      method getDescription
      String getDescription()
      Package:dji.common.error
      Description:

      Returns the description of the error code.

      Return:
      StringThe description of the error code.
      method setDescription
      void setDescription(String desc)
      Package:dji.common.error
      Description:

      Sets the description for the error code.

      Input Parameters:
      String descDescription string.