OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: clofland on March 29, 2006, 10:04:13 am

Title: Charge_percentage
Post by: clofland 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.
Title: Charge_percentage
Post by: desertrat 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
Title: Charge_percentage
Post by: 0xDEADBEEF 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.
Title: Charge_percentage
Post by: desertrat 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
Title: Charge_percentage
Post by: clofland 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.