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 }