Re: Re: first shoot for smartbattery

Bruno Ducrot
2005-01-03T18:02:19Z

On Mon, Jan 03, 2005 at 05:35:13PM +0000, Pedro Venda wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Pedro Venda wrote:
> | Bruno Ducrot wrote:
> |
> | | I think I found was wrong. Please refetch, or (at your option) replace
> | | i2c-acpi-ec.ec with
> | |
> | http://www.poupinou.org/acpi/smartbatt/smartbatt/i2c-acpi-ec/i2c-acpi-ec.c
> | | then redo the sh compile.sh
> | | Sorry, it was a stupid bug(tm) requiring that I buy a brown bag...
> |
> | happens to everyone.
> |
> | | Something wrong also with rmmod i2c-acpi-ec :( so you have to reboot in
> | | order to be able to 'insmod i2c-acpi-ec.ko' again (I'm sure the brown
> | | bag will still be helpfull also...).
>
> ok I made a small patch against your most recent code base:

Thanks.

>
> included:
> - - a Makefile for the i2c-acpi-ec module
> - - a Makefile for the smartbattery program which also calls the
> i2c-acpi-ec make
> process.
>
> in the smartbattery directory, one just "make"s and everything gets built.

Ok.

>
> I found out that when draining power from the battery with no AC power, the
> value returned should be added to -65535 to result in the correct value.
>
> this puzzles me, because when the battery is being used, the returned value
> seems to be subtracted from 65535 but when the AC is plugged, it seems to
> come
> out ok...

Look at http://www.sbs-forum.org/specs/sbdat110.pdf
5.1.11. Current()
why this happens.

--
Bruno Ducrot

-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.