Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f13c6ff5 authored by Adam Lesinski's avatar Adam Lesinski
Browse files

Add BMS as a Battery type

In order to automatically use the /sys/class/power_supply/bms/charge_full
path for reading learned capacity of the battery, the BMS power supply
(Battery Management System) needs to be considered a battery.
Test: Manual

Change-Id: I66e5751547c3dbdc8de0bb3893367cc6f2c9d733
parent a2fc416d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String
    struct sysfsStringEnumMap supplyTypeMap[] = {
            { "Unknown", ANDROID_POWER_SUPPLY_TYPE_UNKNOWN },
            { "Battery", ANDROID_POWER_SUPPLY_TYPE_BATTERY },
            { "BMS", ANDROID_POWER_SUPPLY_TYPE_BATTERY },
            { "UPS", ANDROID_POWER_SUPPLY_TYPE_AC },
            { "Mains", ANDROID_POWER_SUPPLY_TYPE_AC },
            { "USB", ANDROID_POWER_SUPPLY_TYPE_USB },