[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Battery levels
From: |
Daniele Forsi |
Subject: |
Re: Battery levels |
Date: |
Thu, 1 Nov 2007 19:03:46 +0100 |
User-agent: |
KMail/1.9.4 |
Bastien Nocera wrote:
> > the formula used in common/phones/nk6510.c is probably what I copied
> > without undestanding the two different battery_unit settings:
> > 3563: *(data->battery_level) = message[9] * 100 /
> > state->driver.phone.max_battery_level;
>
> To be fair, I didn't really understand those values either.
it seems to me that the value returned by the FBUS protocol represents the
number of segments drawn on the phone display, eg. when the battery is full
my 3330 shows 4 segments and gnobatmon reads "4" but prints "100" using that
formula, when the display shows 3 segments it prints 75 because 3 * 100 / 4 =
75
OTOH the AT protocol command AT+CBC directly returns "percent of capacity
remaining" according to the standrd (3GPP TS 07.07 version 7.8.0 Release
1998), but it doesn't necessarily match with FBUS: on Nokia 8310 with 3
segments on display I got 75 using model = 8310 and 41 with model = AT, later
when it showed 2 segments I got 50 and 35, oh well...
> I fixed gnome-phone-manager to do that now. Thanks.
great, I change gnobatmon and I'm going to change both xgnokii a gnocky soon,
so there will be a uniform way of reading the battery level
> Code review is always good :)
oh yes :)
--
Daniele