[maemo-users] Check battery level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Somebody knows how to do it but a message or attachment is missing:

[maemo-users] Check battery level
carles.bruguera carles.bruguera at guifi.net
Thu Aug 10 21:09:56 EEST 2006

    * Previous message: [maemo-users] Upgrade to OS 2006 Edition with
a Linux Host
    * Next message: [maemo-users] Granule (flashcards) IT2006 port available
    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Thanks!

That's what i was searching.

have you tried to check value just in the moment the visual indicator
changes from 4 bars to 3, 3 to 2 and so on, to check the teoretical
75,50, and 25 % ob the battery?

Maybe with a litttle bit of patience i'll do it :)

En/na Matan Ziv-Av ha escrit:


You can read the raw analog battery level by running the attached
program (value returned in HEX):

./retu-adc 2 3

How to reasonably convert the value to percents is still an open
question. I use the followin function:

int batt_raw_to_pc( int r) {
    /* Linear, for now */
    if(r>=550) return 100;
    if(r>=500) return (r+450)/10;
    if(r<300) return 0;
    return (r-300)*96/200;
}


On 8/18/06, Ian Malcom <ian_malcom_im at yahoo.com> wrote:
> Hi,
>
> I've been trying to figure out the battery power level
> programmatically for weeks now :( Would it be possible
> for someone to post the source of the program that
> does this?
>
> Thanks a lot!!
> Ian
>



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux