Add discharging status

This commit is contained in:
Xiaoxia
2025-03-09 19:18:10 +08:00
parent ad0c5312f8
commit dd1139b169
14 changed files with 67 additions and 57 deletions

View File

@@ -167,6 +167,11 @@ public:
return is_charging_;
}
bool IsDischarging() {
// 没有区分充电和放电,所以直接返回相反状态
return !is_charging_;
}
uint8_t GetBatteryLevel() {
return battery_level_;
}