battery: correct time_to_empty calculation

The kernel docs state that time_to_empty contains the estimation of
remaining time in seconds. Hence, calculate estimate minutes and hours
from that in a more correct way.

Signed-off-by: David Bimmler <git@d4ve.email>
This commit is contained in:
David Bimmler 2023-07-07 11:20:36 +02:00
parent d236b9c1b9
commit 08f5f444eb
2 changed files with 4 additions and 2 deletions

View file

@ -52,6 +52,7 @@
* pipewire: use roundf instead of ceilf for more accuracy ([#262][262])
* Crash when a yaml anchor has a value to already exists in the target
yaml node ([#286][286]).
* battery: Fix time conversion in battery estimation ([#303][303]).
[239]: https://codeberg.org/dnkl/yambar/issues/239
[241]: https://codeberg.org/dnkl/yambar/issues/241