[PATCH] fix util_compute_time_remaining(...) to prevent remove battery.remaining_time

sh at linux2go.dk sh at linux2go.dk
Wed Nov 30 01:58:18 PST 2005


On Thu, Nov 24, 2005 at 10:56:54PM +0100, Danny Kukawka wrote:
> this patch fixes problems with util_compute_time_remaining(...). Currently the 
> property battery.remaining_time is removed if time or chargeLevel not changed 
> between two events (because of return -1 to prevent div-by-zero).
> 
> I added the last chargeRate to the hash table, now we use the this value if 
> nothing changed to return a valid remaining time instead of -1.
> 
> Please review.


Looks good to me.

-- 
| Soren Hansen    | Linux2Go                  | http://Linux2Go.dk/ |
| Seniorkonsulent | Lindholmsvej 42, 2. TH    | +45 46 90 26 42     |
| sh at linux2go.dk  | 9400 Norresundby, Denmark | GPG key: E8BDA4E3   |


More information about the hal mailing list