On Sun, 7 Aug 2005 11:22:18 +0200 Bruno <[EMAIL PROTECTED]> babbled:

> On my Acer Travelmate 662 ACPI always reports a rate of 0 mA.
> This causes the battery module to display a time left of:
>   capacity[mAH] / 2 (result shown as minutes)
> 
> To fix this, "rate_unknown" should be set to 1 if battery is 
> discharging/charging and no estimated time should be displayed.
> 
> I suggest the following patch to apps/e/src/modules/battery/e_mod_main.c:
> 894,895c894,903
> < ____________ __ __ if (!strcmp(charging_state, "discharging")) 
> discharging++;
> < ____________ __ __ if (!strcmp(charging_state, "charging")) charging++;
> ---
> > ____________ __ __ if (!strcmp(charging_state, "discharging"))
> > ____________ __ __ __ {
> > ____________________________ __discharging++;
> > ____________________________ __if (rate == 0 && rate_unknown == 0) 
> > rate_unknown = 1;
> > ____________ __ __ __ }
> > ____________ __ __ if (!strcmp(charging_state, "charging"))
> > ____________ __ __ __ {
> > ____________________________ __charging++;
> > ____________________________ __if (rate == 0 && rate_unknown == 0) 
> > rate_unknown = 1;
> > ____________ __ __ __ }
> 
> 
> As no time information is known under this case, the alarm is not functionnal.
> Eventually if charging/discharging with unknown rate the level should be 
> monitored (e.g. Alarm at x % instead of x minutes)
> 
> A more complex fix would be to monitor the change of level over a few seconds 
> and recalculate the rate out of this.

yeah - that would be.. but i think for now just making it not barf is good for
broken acpi hw that doesnt give rate info :)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
裸好多                              [EMAIL PROTECTED]
Tokyo, Japan (東京 日本)


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to