]> git.sur5r.net Git - i3/i3status/commit
Fix battery indicator on systems without POWER_SUPPLY_VOLTAGE_NOW.
authorKlemen Košir <klemen913@gmail.com>
Mon, 25 Aug 2014 17:03:11 +0000 (19:03 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 25 Aug 2014 17:36:02 +0000 (19:36 +0200)
commitfcd95c24085c985f365d8d5283bccd003084f39d
tree272e1507f92ddc818378d9b55a95028b98345c51
parentd73ca2fa829c722e1ee2a7a0a05a43f4622d6879
Fix battery indicator on systems without POWER_SUPPLY_VOLTAGE_NOW.

In my case, the voltage variable would stay initialized as -1,
which caused the calculation of battery charge percentage to be
incorrect (I would get the message that there is no battery present
or even -0% charge).

I have no idea how this would affect other systems, since I don't
have a chance to test this.
src/print_battery_info.c