From 4f5ac5d9fe7525713a007727dd06d5aae031f6ac Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Tue, 1 May 2018 21:01:25 +0200 Subject: Remove battery_power for various reasons - Battery power cannot be easily gatherable via apm(4) - IMHO it does not represent essential information --- components/battery.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'components/battery.c') diff --git a/components/battery.c b/components/battery.c index 327d576..86ea2a1 100644 --- a/components/battery.c +++ b/components/battery.c @@ -20,18 +20,6 @@ bprintf("%d", perc) : NULL; } - const char * - battery_power(const char *bat) - { - int watts; - char path[PATH_MAX]; - - snprintf(path, sizeof(path), "%s%s%s", "/sys/class/power_supply/", - bat, "/power_now"); - return (pscanf(path, "%i", &watts) == 1) ? - bprintf("%d", (watts + 500000) / 1000000) : NULL; - } - const char * battery_state(const char *bat) { -- cgit v1.2.3