BatteryInfo
public protocol BatteryInfo : Instrument
Instrument that informs a device’s battery.
This instrument can be retrieved by:
drone.getInstrument(Instruments.batteryInfo)
-
Device’s current battery charge level, as an integer percentage of full charge. From 100 to 0.
Declaration
Swift
var batteryLevel: Int { get }
-
Whether the device is currently charging.
true
if the device is charging,false
otherwise.Declaration
Swift
var isCharging: Bool { get }
-
Device’s current battery state of health, as an integer percentage of full health. From 100 to 0.
nil
if not available. This can happen if the drone does not know or provide this information.Declaration
Swift
var batteryHealth: Int? { get }
-
Device’s current battery cycle count, as an integer
nil
if not available. This can happen if the drone does not know or provide this information.Declaration
Swift
var cycleCount: Int? { get }
-
Battery serial number or
nil
if not available.Important
usebatteryDescription.serial
instead of this property.Declaration
Swift
var serial: String? { get }
-
The battery description.
nil
if not available. This can happen if the drone does not know or provide this information.Declaration
Swift
var batteryDescription: BatteryDescription? { get }
-
Battery temperature in Kelvin.
nil
if not available. This can happen if the drone does not know or provide this information.Declaration
Swift
var temperature: UInt? { get }
-
Battery capacity.
nil
if not available. This can happen if the drone does not know or provide this information.Declaration
Swift
var capacity: BatteryCapacity? { get }
-
Battery individual cell voltages in mV. Empty if not available. This can happen if the drone does not know or provide this information.
Note
The size of this array if not empty is expected to be equal tobatteryDescription.cellCount
.Declaration
Swift
var cellVoltages: [UInt?] { get }
-
Battery components’ versions.
nil
if not available. This can happen if the drone does not know or provide this information.Declaration
Swift
var version: BatteryVersion? { get }