Skip to content

Commit

Permalink
Update BATT_HEATH calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
VR-25 committed Jul 17, 2022
1 parent e778686 commit 950709b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install/batt-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ POWER_SUPPLY_WATTS=$POWER_SUPPLY_WATTS"

# battery health
for i in */charge_full_design; do
if [ -f $i ] && [ -f ${i%_design} ]; then
printf "\n%s\n" HEALTH=$(calc2 "($(cat ${i%_design}) * 100) / $(cat $i)")%
if [ -f $i ] && [ -f ${i%/*}/charge_counter ]; then
printf "\n%s\n" BATT_HEALTH=$(calc2 "100 - (($(cat $i) * $(cat $battCapacity) / 100) / $(cat ${i%/*}/charge_counter))")%
break
fi
done
Expand Down

0 comments on commit 950709b

Please sign in to comment.