now that APM_BATT_CHARGING is also set in acpi and on some m1 devices
authorrobert <robert@openbsd.org>
Sun, 6 Feb 2022 09:07:42 +0000 (09:07 +0000)
committerrobert <robert@openbsd.org>
Sun, 6 Feb 2022 09:07:42 +0000 (09:07 +0000)
commitb4c1455d39ac6e4e99ce68320fa0ee930d91624b
tree9db80501a21ce0f8dcd81b28b39463ec740ceb23
parenta4e61cf22f1bd8d754dc71c9dc9dfdcdd88ddfb6
now that APM_BATT_CHARGING is also set in acpi and on some m1 devices
enable support for displaying an estimate recharge time in apm(d)

e.g:
Battery state: charging, 95% remaining, 11 minutes recharge time estimate
Battery state: charging, 97% remaining, 8 minutes recharge time estimate
Battery state: charging, 98% remaining, 6 minutes recharge time estimate
Battery state: charging, 99% remaining, 3 minutes recharge time estimate
Battery state: charging, 99% remaining, 1 minutes recharge time estimate
Battery state: charging, 99% remaining, 0 minutes recharge time estimate

ok jca@
usr.sbin/apm/apm.c
usr.sbin/apmd/apmd.c