DJIBatteryState

@interface DJIBatteryState : NSObject

DJIBatteryState is used to keep track of the real-time state of the battery. It is supported by both smart and non-smart batteries. However for non-smart batteries, only some of the properties are valid: - When the connected product is A3 and N3, only currentVoltage and cellVoltageLevel are valid. - When the connected product is A2, only currentVoltage is valid.

  • Returns the total amount of energy, in mAh (milliamp hours), stored in the battery when the battery is fully charged. The energy of the battery at full charge changes over time as the battery continues to get used. Over time, as the battery continues to be recharged, the value of fullChargeEnergy will decrease.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger fullChargeEnergy;
  • Returns the remaining energy stored in the battery in mAh (milliamp hours).

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger currentEnergy;
  • Returns the percentage of battery energy left. The range of this value is [0 - 100].

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger batteryEnergyRemainingPercent;
  • Returns the current battery voltage (mV).

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger currentVoltage;
  • Returns the real time current draw of the battery (mA). A negative value means the battery is being discharged, and a positive value means it is being charged.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger currentCurrent;
  • Returns the percentage of remaining lifetime value of the battery. The range of this value is [0 - 100]. It is not supported by Inspire 2 and Phantom 4 Pro.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger lifetimeRemainingPercent;
  • Returns the temperature of battery in Centigrade, with a range [-128 to 127].

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger batteryTemperature;
  • Returns the total number of discharges the battery has gone through over its lifetime. The total number of discharges includes discharges that happen through normal use and discharges that are manually set.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger numberOfDischarge;
  • Current cell voltage level of the battery. It is only supported when the connected product is stand-alone A3 and N3.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIBatteryCellVoltageLevel cellVoltageLevel;
  • YES if the battery is being charged. It is only supported by Osmo Mobile.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isBeingCharged;
  • `YES’ if only one battery is inserted to slot on the the right or starboard side of the aircraft. The aircraft can still take off but the flight time will be shorter. It is only supported by Inspire 2. Inspire 2 must always have a battery in the right or starboard slot.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isInSingleBatteryMode;