This class manages information and real-time status of the connected product's batteries. This object is available from the Aircraft or HandHeld object which is a subclass of BaseProduct.
Provides the self-heating state for the battery. When the temperature of the battery is below a threshold, it will warm up automatically. For Mavic 2 Enterprise, the self-heating is triggered when the temperature is lower than 6 Celsius degrees. When the temperature reaches 8 Celsius degrees, the battery will start to preserve the temperature and maintain it between 6 Celsius degrees and 8 Celsius degrees.
Enum Members:
IDLE
The auto heating feature is idle.
WARMING_UP
The battery is warming itself up automatically.
PRESERVING
The battery is preserving its temperature. For Mavic 2 Enterprise, the temperature will be maintained between 6 Celsius degrees and 8 Celsius degrees.
When the connected battery is not a smart battery, the number of cells needs to be set manually. The flight controller uses the number of cells and the cell voltage threshold to determine if the aircraft should go home or land. The valid range is [3, 12] cells.
true if the battery is a smart battery. When the connected battery is a DJI smart battery, more information can be obtained by communicating with the battery.
A battery's full charge capacity reduces a little every time it goes through a discharge and recharge cycle. Therefore, older batteries that have gone through many cycles will have lower full charge capacity than newer batteries. When multiple batteries are used simultaneously in a product, the aggregate full charge capacity will be limited by the battery with the lowest full charge capacity.
To optimize the amount of energy delivered by a battery over its lifetime to a product, batteries should be matched or paired with other batteries of similar full charge capacity. The operational challenges of always using paired batteries can be alleviated using the battery pairing interfaces.
This method will pair two batteries by recording the aggregate of their serial numbers in each of their firmwares. getPairingState can then be used to determine if the installed battery combination is a previously assigned pair or not. Batteries can be repaired.
Input Parameters:
@Nullable CompletionCallback callback
Completion callback that receives the execution result.
A battery's full charge capacity reduces a little every time it goes through a discharge and recharge cycle. Therefore, older batteries that have gone through many cycles will have lower full charge capacity than newer batteries. When multiple batteries are used simultaneously in a product, the aggregate full charge capacity will be limited by the battery with lowest full charge capacity.
To optimize the amount of energy delivered by a battery over its lifetime to a product, batteries should be matched or paired with other batteries of similar full charge capacity. The operational challenges of always using paired batteries can be alleviated using the battery pairing interfaces. This method can then be used to determine if the installed battery combination is a previously assigned pair or not.
Sets the Level 1 cell voltage threshold in mV. When the cell voltage of the battery crosses below the threshold, Level 1 behavior will be executed. The valid range is [3600, 4000] mV. When the new value is not 100 mV higher than the Level 2 cell voltage threshold, the Level 2 threshold will be set to (new value - 100) mV.
Input Parameters:
@IntRange(from = 3600, to = 4000) int voltage
Level 1 cell voltage threshold to set in mV.
@Nullable CompletionCallback callback
Completion block that receives the setter execution result.
Gets the Level 1 cell voltage threshold in mV. When the cell voltage of the battery crosses below the threshold, Level 1 behavior will be executed. The valid range is [3600, 4000] mV.
Input Parameters:
@NonNull CompletionCallbackWith<Integer> callback
Asynchronous execution result callback that contains the voltage threshold.
Sets the Level 2 cell voltage threshold in mV. When the cell voltage of the battery crosses below the threshold, Level 2 behavior will be executed. The valid range is [3500, 3800] mV and must be at least 100 mV lower than the Level 1 voltage threshold.
Enables/disables the LED lights on the batteries. If all batteries' LEDs on the aircraft are turned off, the aircraft's power button LED indicator should be off. It's supported only by Matrice 300 RTK.
Input Parameters:
boolean enabled
true to enable the LED lights on the batteries.
@Nullable CompletionCallback callback
Completion callback that receives the setter execution result.
Determines if the LEDs on the battery is on. If all batteries' LEDs on the aircraft are turned off, the aircraft's power button LED indicator should be off. It's supported only by Matrice 300 RTK.
Input Parameters:
@NonNull CompletionCallbackWith<Boolean> callback
The execution callback with the returned value(s).
Gets the battery's warning records, which are kept for 30 days using objects of type WarningRecord. Call the isSmartBattery() method before using this method. Not supported by Osmo and non-smart batteries.
Smart batteries can be setup to automatically discharge over a custom period of time. This method sets the battery's self discharge period in days with range [1, 10]. For Inspire 2 and M200 series products, the max range value can be 20. Not supported by Mavic Air 2, DJI Air 2S, non-smart batteries, Spark and the Osmo series.
Smart batteries can be setup to automatically discharge over a custom period of time. This method gets the battery's self discharge period in days with range [1, 10]. For Inspire 2 and M200 series products, the max range value can be 20. Not supported by non-smart batteries and the Osmo series.
Input Parameters:
@NonNull CompletionCallbackWith<Integer> callback
Asynchronous execution result callback that contains the number of days to discharge over.
Returns the component index. Index is zero based. A component will have an index greater than zero when there are multiple components of the same type on the DJI product, and one of the components already has the index 0. For instance, M210 can have two gimbal mounted cameras, and will therefore have two gimbal components with indices 0 and 1, and two camera components with indices 0 and 1. For Matrice 600, there are printed numbers on the battery boxes. The Battery component instance with index 0 corresponds to battery compartment number 1. For Inspire 2 and M200 series, Battery with index 0 corresponds to the battery on the port (left hand) side of the aircraft. For M210, M210 RTK, M300 RTK and M350 RTK, Camera and Gimbal with index 0 corresponds to the camera and gimbal on the port (left hand) side of the aircraft. Lidar with index 0 corresponds to the lidar(Zenmuse L1) on the port (left hand) side of the aircraft.
Gets the serial number of the component. Depending on the component, this serial number might not match the serial number found on the physical component.
Returns the firmware version of the component. Each component will have a different firmware version, the combination of which will form the package firmware version getFirmwarePackageVersion found in BaseProduct.
Input Parameters:
@NonNull CompletionCallbackWith<String> callback
The execution callback with the value(s) returned.