mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-04 20:43:14 +12:00
collect: Fix reading of battery power draw on Linux
This was erroneously set to read from the current battery charge. Fixes #770.
This commit is contained in:
parent
fd2a2acdad
commit
e031cce6ba
|
@ -835,7 +835,7 @@ namespace Cpu {
|
|||
if (b.use_power) {
|
||||
if (not b.power_now.empty()) {
|
||||
try {
|
||||
watts = (float)stoll(readfile(b.energy_now, "-1")) / 1000000.0;
|
||||
watts = (float)stoll(readfile(b.power_now, "-1")) / 1000000.0;
|
||||
}
|
||||
catch (const std::invalid_argument&) { }
|
||||
catch (const std::out_of_range&) { }
|
||||
|
|
Loading…
Reference in a new issue