hello,
I'm using -current and with the recent commits now acpi works on my
laptop. by reading the cvs commit logs I've seen that it is possible
to use apmd via acpi (apmd -f /dev/acpi) for retrieving power
information w/ apm command. however apm output shows me a wrong
minutes life estimate value i.e it is always 100 when battery charge
state is in between 50-100% and always 0 when charge is in between
0-50%. browsing the acpi.c code I've seen in the acpiioctl routine the
following calculation is performed
---8<---
if (pi->ac_state == APM_AC_ON || rate == 0)
pi->minutes_left = (unsigned int)-1;
else
pi->minutes_left = minutes / rate * 100;
---8<---
Now by reading the ACPI spec. I read that
Remaining Battery Life [h] = Battery Remaining Capacity/Battery Present Rate
my question is:
should
pi->minutes_left = minutes / rate * 100
be rewritten as
pi->minutes_left = (100*minutes) / rate?
and then why 100? if the previous formula show me [h]our we should
multiply it by 60...
thank you for any explanation,
giovanni