DJI Mobile SDK Documentation

      class DUXBatteryWidget

      @interface DUXBatteryWidget : DUXWidget
      Header:DUXBatteryWidget.h
      Inherits From:DUXWidget
      Display:

      uilib_image

      Battery icon has two color states. White color indicates everything is ok. Icon will change into red color if aircraft needs to return home, land immediately, or battery connection is bad. Text shows percentage of charge remaining in battery. Text also has two color states. Green indicates the percentage is ok. Red indicates the percentage is either below or just enough for returning home or landing immediately.

      Usage:

      Preferred Aspect Ratio: 22:9.

      Class Members:
      property battery1Percentage
      @property (nonatomic, assign, readonly) float battery1Percentage
      Header:DUXBatteryWidget.h
      Description:

      Battery percentage with range [0,100].

      property battery2Percentage
      @property (nonatomic, assign, readonly) float battery2Percentage
      Header:DUXBatteryWidget.h
      Description:

      Battery percentage with range [0,100].

      enum DUXBatteryIndicatorState
      typedef NS_ENUM(NSUInteger, DUXBatteryIndicatorState)
      Header:DUXBatteryWidget.h
      Description:

      Enum describing the battery state.

      Enum Members:
      DUXBatteryIndicatorStateWarningLevel2Battery Warning level 2.
      DUXBatteryIndicatorStateWarningLevel1Battery Warning level 1.
      DUXBatteryIndicatorStateNormalNormal
      DUXBatteryIndicatorStateErrorError.
      DUXBatteryIndicatorStateUnknownBattery state unknown.