diff options
author | Slávek Banko <[email protected]> | 2020-01-08 01:49:53 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-01-08 01:50:17 +0100 |
commit | 53381ab391d68a1939d6854ce16bf982a138d944 (patch) | |
tree | bd6a7c75ed94708db0b3e2bdf8c0d61f0eb0241f /tdeioslave/iso/iso.h | |
parent | 2e7ef9566388fb3f52298a38ff2fab0be1bd3d54 (diff) | |
download | tdelibs-53381ab391d68a1939d6854ce16bf982a138d944.tar.gz tdelibs-53381ab391d68a1939d6854ce16bf982a138d944.zip |
tdehwlib: Adjusted parsing of battery information
+ Added initialization of all values
Some batteries do not provide all values and, without
initialization, values may contain dubious data.
+ Added reading of current battery capacity value in percent
(capacity)
Some batteries may provide the current capacity value in
percent instead of the current energy value.
+ Added check whether the battery provides current energy value
(charge_now or energy_now)
The current energy is calculated if the value is not provided
in the battery information.
+ Added reading of estimated time to empty battery
(time_to_empty_now)
The remaining time is calculated if the value is not provided
in the battery information.
If the battery does not provide charging current information,
the estimated time to charge the battery cannot be calculated.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 86c1d896c748bf5117ccfe28b20e48a7e2a70c8d)
Diffstat (limited to 'tdeioslave/iso/iso.h')
0 files changed, 0 insertions, 0 deletions