From owner-cvs-all@FreeBSD.ORG Mon Mar 8 12:33:46 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1535216A4D0 for ; Mon, 8 Mar 2004 12:33:46 -0800 (PST) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1DCF43D49 for ; Mon, 8 Mar 2004 12:33:45 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 6523 invoked from network); 8 Mar 2004 20:33:45 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 8 Mar 2004 20:33:45 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i28KXX2B019060; Mon, 8 Mar 2004 15:33:41 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: "Daniel O'Connor" Date: Mon, 8 Mar 2004 15:01:55 -0500 User-Agent: KMail/1.6 References: <200403051335.55836.doconnor@gsoft.com.au> <20040305.113544.68047468.imp@bsdimp.com> <200403061118.32829.doconnor@gsoft.com.au> In-Reply-To: <200403061118.32829.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403081501.55307.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: src-committers@freebsd.org cc: cvs-src@freebsd.org cc: cvs-all@freebsd.org cc: nate@root.org cc: takawata@init-main.com cc: "M. Warner Losh" Subject: Re: cvs commit: src/usr.sbin/acpi/acpiconf acpiconf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2004 20:33:46 -0000 On Friday 05 March 2004 07:48 pm, Daniel O'Connor wrote: > On Sat, 6 Mar 2004 05:05, M. Warner Losh wrote: > > I've just added the following, based on the other ioctl that you can > > get battery info from: > > > > State: Present > > Rate: 50000 mWh > > Cap: 50000 mWh > > Volt: 10.0 V > > > > Note: My battery/ACPI has a bug where 'RATE' and 'CAP' are always the > > same number. I have a second bug where the CAP is listed as being > > more than the last full capacity of the battery. This makes it very > > hard to do estimates for remaining battery life, but I'm not sure what > > can be done about it. > > I think you have to massage the data a fair bit to throw obvious outliers > away. Also I believe most implementations produce totally bogus values > during charging so you ignore rate when the battery is charging. During charging, implementations are supposed to tell you how fast it is charging so you can compute how much time is needed to get to a full charge, not how much battery life time is left. However, many BIOS's are broken. My old laptop never returned a sane value for rate and my new one always returns a rate of 0, both of which violate the spec. *sigh* -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org