summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Iacob <iacobp@oregonstate.edu>2022-11-26 20:11:01 -0800
committerRafael Marçalo <raroma09@gmail.com>2022-12-01 15:46:02 +0000
commit9e8187327f6eefe474715e8bb9e66e54be354b45 (patch)
tree2a93797b14769a9d9d7676a0c106b72c25a0a1e1
parent2fc29dbd3da312f6c3de2e75e8f7363235b0795d (diff)
battery: Fix remaining on Linux
The current version displays the remaining time as 'n/a'. Fixes this regression introduced in 69b2487650782f135db76078c4a7fb841cb936ac where current_now and power_now were incorrectly replaced with current and power when they were moved to a macro.
-rw-r--r--components/battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/battery.c b/components/battery.c
index b12c59e..9fa1014 100644
--- a/components/battery.c
+++ b/components/battery.c
@@ -14,8 +14,8 @@
#define POWER_SUPPLY_STATUS "/sys/class/power_supply/%s/status"
#define POWER_SUPPLY_CHARGE "/sys/class/power_supply/%s/charge_now"
#define POWER_SUPPLY_ENERGY "/sys/class/power_supply/%s/energy_now"
- #define POWER_SUPPLY_CURRENT "/sys/class/power_supply/%s/current"
- #define POWER_SUPPLY_POWER "/sys/class/power_supply/%s/power"
+ #define POWER_SUPPLY_CURRENT "/sys/class/power_supply/%s/current_now"
+ #define POWER_SUPPLY_POWER "/sys/class/power_supply/%s/power_now"
static const char *
pick(const char *bat, const char *f1, const char *f2, char *path,