fix charge reading

This commit is contained in:
Guillaume Castagnino 2019-05-15 11:32:57 +02:00
parent cb7295066a
commit 758eb3e873
1 changed files with 2 additions and 2 deletions

View File

@ -1629,10 +1629,10 @@ sub battery
my $this = shift;
my $bat = shift;
open FH, "</sys/class/power_supply/$bat/energy_full_design";
open FH, "</sys/class/power_supply/$bat/charge_full_design";
my $full = <FH>;
close FH;
open FH, "</sys/class/power_supply/$bat/energy_now";
open FH, "</sys/class/power_supply/$bat/charge_now";
my $now = <FH>;
close FH;
chomp $full;