![]() |
2009-01-12
, 20:19
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#12
|
Is it possible to read the raw battery level (direct from the hardware)?
I'm thinking of an application that reads battery level every minute and adds it to a max 120 line log in /tmp/. The application then weights the readings slightly more toward present, to compute a more accurate reading (that would survive a reboot).
Possible?
![]() |
2009-01-12
, 20:56
|
|
Posts: 903 |
Thanked: 632 times |
Joined on Apr 2008
|
#13
|
http://mrrau.dyndns.org:23280/n800/kcbatt/
![]() |
2009-01-12
, 20:59
|
Posts: 1,224 |
Thanked: 1,763 times |
Joined on Jul 2007
|
#14
|
![]() |
2009-01-12
, 21:09
|
Posts: 1,224 |
Thanked: 1,763 times |
Joined on Jul 2007
|
#15
|
My C/C++ skills are very weak, but maybe I can modify the source and add some sort of algorithm to more accurately predict battery level. Or maybe not
The Following User Says Thank You to Matan For This Useful Post: | ||
![]() |
2009-01-12
, 21:39
|
|
Posts: 903 |
Thanked: 632 times |
Joined on Apr 2008
|
#16
|
~/scripts $ ./retu-adc 0: ffffffff 1: ffffffff 2: ffffffff 3: ffffffff 4: ffffffff 5: ffffffff 6: ffffffff 7: ffffffff 8: ffffffff 9: ffffffff 10: ffffffff 11: ffffffff 12: ffffffff 13: ffffffff 14: ffffffff 15: ffffffff
![]() |
2009-01-12
, 22:41
|
|
Posts: 903 |
Thanked: 632 times |
Joined on Apr 2008
|
#18
|
![]() |
2009-01-12
, 22:54
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#19
|
Matan, could you please change the output of retu-adc to decimal instead of hex?
I would do it myself, but, again, my C skills are lacking
for(i=s;i<e;i++) { printf("%d: %08x ", i, ioctl(f,RETU_IOCH_ADC_READ, i)); if((i&3)==3)printf("\n"); }
for(i=s;i<e;i++) { printf("%d: %010d ", i, ioctl(f,RETU_IOCH_ADC_READ, i)); if((i&3)==3)printf("\n"); }
The Following User Says Thank You to Benson For This Useful Post: | ||
![]() |
2009-01-12
, 22:55
|
Posts: 1,224 |
Thanked: 1,763 times |
Joined on Jul 2007
|
#20
|
The Following User Says Thank You to Matan For This Useful Post: | ||
I recently had an issue where i thought there was a firmware problem with the battery level. it turned out to be a bad battery (mine was 13 months old)