GSBatteryInfo

@objc
public protocol GSBatteryInfo : Instrument

Instrument that informs a device’s battery.

This instrument can be retrieved by:

drone.getInstrument(Instruments.batteryInfo)

Note

This protocol is for Objective-C only. Swift must use the protocol 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

    @objc(batteryHealth)
    var gsBatteryHealth: NSNumber? { get }