Author Topic: Charge_percentage  (Read 2986 times)

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
Charge_percentage
« on: March 29, 2006, 10:04:13 am »
What happened to /proc/driver/battery/charge_percentage ???

I was using it in some of my scripts.

Can I bring it back?

If not, what should be used instead?

I see /proc/driver/battery/sharpsl_main_battery_voltage, but I'm not sure how to convert those numbers to a "percent of full" number for my scripts.

The battery meter must be using something, right? I supposed I should go look at the code.
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Charge_percentage
« Reply #1 on: March 29, 2006, 10:21:45 am »
Quote
What happened to /proc/driver/battery/charge_percentage ???

I was using it in some of my scripts.

Can I bring it back?

If not, what should be used instead?
On my C3100 /proc/apm holds the battery percentage charge.

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

0xDEADBEEF

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Charge_percentage
« Reply #2 on: March 29, 2006, 06:03:19 pm »
Quote
Quote
What happened to /proc/driver/battery/charge_percentage ???

I was using it in some of my scripts.

Can I bring it back?

If not, what should be used instead?
On my C3100 /proc/apm holds the battery percentage charge.

-- cheers
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120863\"][{POST_SNAPBACK}][/a][/div]

Yeah, except on mine it shows 255% charge.

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Charge_percentage
« Reply #3 on: March 29, 2006, 08:22:11 pm »
Quote
Quote
On my C3100 /proc/apm holds the battery percentage charge.

Yeah, except on mine it shows 255% charge.
Mine too if it's running off the power supply. Have you tried it whilst running off the battery?

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

clofland

  • Full Member
  • ***
  • Posts: 247
    • View Profile
    • http://www.lofland.net/
Charge_percentage
« Reply #4 on: March 30, 2006, 01:03:34 pm »
Quote
On my C3100 /proc/apm holds the battery percentage charge.

[div align=\"right\"][a href=\"index.php?act=findpost&pid=120863\"][{POST_SNAPBACK}][/a][/div]

Thanks! That works great on my 760 too.

Yeah, it shows 255% when plugged in, but that is ok. It goes to 100% as soon as I pull the plug. That seems like a "feature" to me. I know that over 100% means "on AC power" and so I can use all the juice I want to.

I have scripts kicked off by atd that run periodically. I have them set to shut themselves down and the entire atd service if power goes below a certain level so I don't find a dead Z when I need it.
C-760 Last Running pdaXrom 1.1.0beta3
- Sandisk UltraII 1GB SD card - Socket LP CF LAN card - Socket LP CF WLAN card - Socket CF Bluetooth Card Rev H -