30 #ifndef ADVANCED_SENSING_DJI_BATTERY_H 31 #define ADVANCED_SENSING_DJI_BATTERY_H 42 uint32_t reserve1 :15;
43 uint32_t isFakeSingleBatteryMode:1;
44 uint32_t isSingleBatteryMode:1;
46 uint32_t batteryNotReady:1;
51 uint32_t veryLowVoltageAlarm:1;
52 uint32_t LowVoltageAlarm:1;
54 uint32_t seriousLowCapacityAlarm:1;
55 uint32_t LowCapacityAlarm:1;
64 uint16_t remainFlyTime;
65 uint16_t goHomeNeedTime;
72 uint8_t goHomeCountDownState;
80 uint8_t lowBatteryAlarmEnable :1;
81 uint8_t seriousLowBatteryAlarmThreshold:7;
82 uint8_t seriousLowBatteryAlarmEnable :1;
89 DJI_BATTERY_SELF_CHECK_NORAML = 0,
90 DJI_BATTERY_SELF_CHECK_NTC_ABNORAML = 1,
91 DJI_BATTERY_SELF_CHECK_MOS_ABNROMAL = 2,
92 DJI_BATTERY_SELF_CHECK_R_ABNORMAL = 3,
93 DJI_BATTERY_SELF_CHECK_CELL_DAMAGE = 4,
94 DJI_BATTERY_SELF_CHECK_CAL_EXP = 5,
95 DJI_BATTERY_SELF_CHECK_GAUGEPARM_EXP = 6,
96 DJI_BATTERY_SELF_CHECK_RES = 7,
101 DJI_BETTERY_CLOSED_NORMAL = 0,
102 DJI_BETTERY_CLOSED_FORCED = 1,
103 DJI_BETTERY_CLOSED_SCD = 2,
134 DJI_SOC_ABNORMAL_HIGH = 1,
135 DJI_SOC_JUMP_DOWN = 2,
143 typedef struct DJISmartBatteryState {
144 uint32_t reserved :12;
145 uint32_t cellBreak :5;
146 uint32_t selfCheckError :3;
147 uint32_t reserved1 :7;
148 uint32_t batteryClosedReason :5;
149 uint8_t reserved2 :6;
150 uint8_t batSOHState :2;
151 uint8_t maxCycleLimit:6;
152 uint8_t reserved3 :2;
153 uint16_t lessBattery :1;
154 uint16_t batteryCommunicationAbnormal:1;
155 uint16_t reserved4 :3;
156 uint16_t hasCellBreak :1;
157 uint16_t reserved5 :4;
158 uint16_t isBatteryEmbed :1;
159 uint16_t heatState :2;
160 uint16_t socState :3;
161 } DJISmartBatteryState;
163 typedef struct SmartBatteryDynamicInfo {
165 uint8_t batteryIndex;
166 int32_t currentVoltage;
167 int32_t currentElectric;
168 uint32_t fullCapacity;
169 uint32_t remainedCapacity;
170 int16_t batteryTemperature;
172 uint8_t batteryCapacityPercent;
173 DJISmartBatteryState batteryState;
177 } SmartBatteryDynamicInfo;
182 class DJIBatteryImpl;
187 enum class RequestSmartBatteryIndex
189 FIRST_SMART_BATTERY = 1,
190 SECOND_SMART_BATTERY = 2,
194 DJIBattery(Vehicle *vehicle = 0);
198 DJIBatteryImpl* djiBatteryImpl;
215 bool subscribeBatteryWholeInfo(
bool enable);
235 bool getSingleBatteryDynamicInfo(
const DJIBattery::RequestSmartBatteryIndex batteryIndex, SmartBatteryDynamicInfo& batteryDynamicInfo);
240 #endif //ADVANCED_SENSING_DJI_BATTERY_H DJISmartBatteryHeatState
Definition: dji_battery.hpp:125
Definition: dji_battery.hpp:109
struct DJI::OSDK::BatteryWholeInfo BatteryWholeInfo
DJIBatteryClosedReasonImpl
Definition: dji_battery.hpp:100
DJISmartBatterySohState
Definition: dji_battery.hpp:117
float safeFlyRadius
Definition: dji_battery.hpp:69
DJIWholeBatteryState batteryState
Definition: dji_battery.hpp:71
DJISmartBatterySocWarning
Definition: dji_battery.hpp:132
uint8_t lowBatteryAlarmThreshold
Definition: dji_battery.hpp:79
DJISmartBatterySelfCheck
Definition: dji_battery.hpp:88
Definition: dji_battery.hpp:112
Definition: dji_battery.hpp:106
Definition: dji_battery.hpp:104
Definition: dji_battery.hpp:113
Definition: dji_battery.hpp:107
Definition: dji_battery.hpp:110
Definition: dji_battery.hpp:41
Definition: dji_battery.hpp:108
Data type and Data Structure definitions for use throughout DJI OSDK.
Definition: dji_battery.hpp:63
uint16_t landNeedTime
Definition: dji_battery.hpp:66
uint16_t landNeedCapacity
Definition: dji_battery.hpp:68
uint16_t goHomeNeedCapacity
Definition: dji_battery.hpp:67
Definition: dji_ack.cpp:38
struct DJI::OSDK::DJIWholeBatteryState DJIWholeBatteryState
uint8_t gohomeCountDownvalue
Definition: dji_battery.hpp:76
Definition: dji_battery.hpp:111
uint32_t voltageNotSafety
Definition: dji_battery.hpp:48
Definition: dji_battery.hpp:105
uint16_t voltage
Definition: dji_battery.hpp:77
uint32_t reserve3
Definition: dji_battery.hpp:50
float capacityConsumeSpeed
Definition: dji_battery.hpp:70
uint8_t batteryCapacityPercentage
Definition: dji_battery.hpp:78