mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 21:39:02 +00:00
[ bsp ] adding axp813 way of displaying battery status on Olimex Lime A64 and similar boards
This commit is contained in:
parent
6fdd273b8a
commit
a979430e9b
1 changed files with 7 additions and 0 deletions
|
@ -75,6 +75,13 @@ function batteryinfo() {
|
|||
status_battery_text=" discharging"
|
||||
fi
|
||||
fi
|
||||
elif [[ -e "$legacy_dir/axp813-ac" ]]; then
|
||||
read status_battery_connected < $legacy_dir/axp20x-battery/present
|
||||
if [[ "$status_battery_connected" == "1" ]]; then
|
||||
status_battery_text=" "$(awk '{print tolower($0)}' < $legacy_dir/axp20x-battery/status)
|
||||
read status_ac_connect < $legacy_dir/axp813-ac/present
|
||||
read battery_percent< $legacy_dir/axp20x-battery/capacity
|
||||
fi
|
||||
elif [[ -e "$legacy_dir/battery" ]]; then
|
||||
if [[ (("$(cat $legacy_dir/battery/voltage_now)" -gt "5" )) ]]; then
|
||||
status_battery_text=" "$(awk '{print tolower($0)}' < $legacy_dir/battery/status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue