diff --git a/packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo b/packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo index 9cfae92513..22db3bd4f4 100755 --- a/packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo +++ b/packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo @@ -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)