From c0c5df0f6ac9a5f8b0e7dc3dbdba6124a3129e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 14 Nov 2020 23:02:18 +0100 Subject: [PATCH] =?UTF-8?q?module/battery:=20map=20=E2=80=9CNot=20charging?= =?UTF-8?q?=E2=80=9D=20to=20STATE=5FDISCHARGING?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/battery.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/battery.c b/modules/battery.c index ce0d04c..fda099b 100644 --- a/modules/battery.c +++ b/modules/battery.c @@ -297,6 +297,8 @@ update_status(struct module *mod, int capacity_fd, int energy_fd, int power_fd, state = STATE_CHARGING; else if (strcmp(status, "Discharging") == 0) state = STATE_DISCHARGING; + else if (strcmp(state, "Not charging") == 0) + state = STATE_DISCHARGING; else if (strcmp(status, "Unknown") == 0) state = STATE_DISCHARGING; else {