diff options
author | David96 <davidlepplaweber@aospa.co> | 2018-09-03 20:50:36 +0200 |
---|---|---|
committer | David96 <davidlepplaweber@aospa.co> | 2018-09-03 20:50:36 +0200 |
commit | 6a5e5b8ac45a984ed8a3b9c5b7650df5448fa14c (patch) | |
tree | 3db898102fa8f1907277dd8392bcbed262d621e3 | |
parent | 38ead0249b42233993b7925a57eeceb69e9d9d38 (diff) |
Add support for "POWER_SUPPLY_STATUS=Not charging" (fixes #304)
-rw-r--r-- | src/print_battery_info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print_battery_info.c b/src/print_battery_info.c index 8c85192..3ac8c11 100644 --- a/src/print_battery_info.c +++ b/src/print_battery_info.c @@ -179,7 +179,7 @@ static bool slurp_battery_info(struct battery_info *batt_info, yajl_gen json_gen batt_info->status = CS_CHARGING; else if (BEGINS_WITH(last, "POWER_SUPPLY_STATUS=Full")) batt_info->status = CS_FULL; - else if (BEGINS_WITH(last, "POWER_SUPPLY_STATUS=Discharging")) + else if (BEGINS_WITH(last, "POWER_SUPPLY_STATUS=Discharging") || BEGINS_WITH(last, "POWER_SUPPLY_STATUS=Not charging")) batt_info->status = CS_DISCHARGING; else if (BEGINS_WITH(last, "POWER_SUPPLY_STATUS=")) batt_info->status = CS_UNKNOWN; |