mirror of
https://github.com/stumpwm/stumpwm-contrib.git
synced 2026-09-10 07:26:25 -04:00
Use absolute value of current_now
It seems on my system that there has been a recent kernel change where `current_now` is reported negative when discharging, leading to no reported time remaining, only a dash; given this is only on certain kernel versions, it is perhaps better to just take the absolute value of `current_now` when calculating time remaining, just to remain compatible with both
This commit is contained in:
parent
1e3fa7abae
commit
8851f78a2b
|
|
@ -209,7 +209,7 @@
|
|||
(sysfs-int-field path "charge_now")))
|
||||
(consumption ()
|
||||
(or (sysfs-int-field path "power_now")
|
||||
(sysfs-int-field path "current_now")))
|
||||
(abs (sysfs-int-field path "current_now"))))
|
||||
(capacity-native ()
|
||||
(sysfs-int-field path "capacity"))
|
||||
(capacity-calculate ()
|
||||
|
|
|
|||
Loading…
Reference in a new issue