BatteryInfo

interface BatteryInfo : Instrument

Instrument that informs about a device's battery.

This instrument can be obtained from a instrument providing device (such as a drone or a remote control) using:

device.getInstrument(BatteryInfo.class)

See also

com.parrot.drone.groundsdk.device.instrument.Instrument.Provider

Instrument.Provider#getInstrument(Class, Ref.Observer)

Functions

getBatteryCycleCount
Link copied to clipboard
abstract fun getBatteryCycleCount(): OptionalInt
Retrieves the device's current battery cycle count.
getBatteryHealth
Link copied to clipboard
abstract fun getBatteryHealth(): OptionalInt
Retrieves the device's current battery state of health, as an integer percentage of full health.
getBatteryLevel
Link copied to clipboard
@IntRange(from = 0, to = 100)
abstract fun getBatteryLevel(): Int
Retrieves the device's current battery charge level, as an integer percentage of full charge.
getSerial
Link copied to clipboard
abstract fun getSerial(): String
Retrieves the battery serial number.
isCharging
Link copied to clipboard
abstract fun isCharging(): Boolean
Tells whether the device is currently charging.