Fix for not showing battery on Odroid C2

This commit is contained in:
Igor Pecovnik
2016-03-26 15:05:13 +01:00
parent 0f40a3f711
commit 65ca632d7b

View File

@@ -73,7 +73,7 @@ fi
# legacy kernel
axp_dir="/sys/class/power_supply"
if [[ -e "$axp_dir" && -e "$axp_dir/battery" ]]; then
if [[ (("$(cat $axp_dir/battery/voltage_now)" -gt "0" )) ]]; then
if [[ (("$(cat $axp_dir/battery/voltage_now)" -gt "5" )) ]]; then
status_battery_text=" "$(cat $axp_dir/battery/status | awk '{print tolower($0)}')
battery_percent=$(cat $axp_dir/battery/capacity)
fi