Here is the beta AppleACPIBatteryManager I have been working on. It will work with original PowerManagement and you don't need AppleACPIPowerSource. Although some values may have "0" value, it should display "Time" and "Percentage" but I am not sue if it is accurate or not. Also, "Power source" should detect correctly and icon should change correctly. If you are using the notebook, you can give it a try.
It is based on original AppleSmartBatteryManager and linux driver. It should work both on Tiger and Leopard. (I used Tiger to compile the source code and it work on my 10.4.11 and 10.5.4)
Again, it is just the beta version and you need the original PowerManagement with it.
Chun-Nan
=====
Battery Information:
Model Information:
Serial Number: TOSHIBA-PA3399U -Li-Ion-3658Q
Manufacturer: TOSHIBA
Device name: PA3399U
Pack Lot Code: 0000
PCB Lot Code: 0000
Firmware Version: 0000
Hardware Revision: 0000
Cell Revision: 0000
Charge Information:
Charge remaining (mAh): 4400
Fully charged: Yes
Charging: No
Full charge capacity (mAh): 4400
Health Information:
Cycle count: 1
Condition: Good
Battery Installed: Yes
Amperage (mA): 0
Voltage (mV): 11100
=====
PowerManagement.original.zip 224.78KB
5505 downloads (only English)=====
Update: 7/6/2008
1. Using "fCurrentVoltage" to FAKE "fCurrentRate" if "fCurrentRate" is read as 0.
AppleACPIBatteryManager.zip 182.06KB
329 downloadsUPDATE: 7/7/2008
1. Using "fMaxCapacity" to FAKE "fCurrentRate" if "fCurrentRate" is read as 0.
2. Change battery dectection funcion. (battery inserted and removed)
2. Change poll time from 10 seconds to 30 seconds
AppleACPIBatteryManagerb2.zip 206.74KB
116 downloadsUPDATE: 7/9/2008
1. Make sure "fMaxCapacity" is always equal to or larger than "fCurrentCapacity".
AppleACPIBatteryManager_b3.zip 509.08KB
87 downloadsUPDATE: 7/10/2008
1. Added "Battery Information" and "Battery Status" so that it will show on ioreg.
2. Using "fMaxCapacity" to caculate remaning time while battery is charging.
AppleACPIBatteryManager_b4.zip 218.71KB
137 downloadsUPDATE: 7/11/2008
1. Cleaned up some unused codes.
2. Tried to fix the percentage issue.
AppleACPIBatteryManager_b5.zip 467.69KB
73 downloadsUPDATE: 7/13/2008
1. Serial Number will show type and serial number instead of 0 if it reads any data.
2. Tried to fix more than one battery bay issue by using "_UID" flag. (need feedbacks)
AppleACPIBatteryManager_b6.zip 324.82KB
255 downloadsUPDATE: 7/21/2008
1. Tried to fix OSString/OSData issue on battery info. (need feedbacks)
2. Tried to fix more than one battery bay issue. (need feedbacks)
AppleACPIBatteryManager_b7.zip 426.92KB
75 downloadsUPDATE: 7/21/2008
1. Tried to fix more than one battery bay issue by using "_STA" flag. (need feedbacks)
AppleACPIBatteryManager_b8.zip 217.69KB
284 downloadsUPDATE: 7/26/2008
1. Added CycleCount caculation and CellVoltages information. (need feedbacks)
AppleACPIBatteryManager_b9.zip 478.22KB
71 downloadsUPDATE: 7/29/2008
1. Using "fCurrentVoltage" to caculate temperature.
( [fCurrentVoltage * fCurrentRate] should be used to caculate temperature. However, when the battery is FULL, fCurrentRate will be 0 and will make temperature become 0. To make it simpe, just use fCurrentVoltage untill I find a better solution.)
2. Fixed wrong "Power Unit" issue.
AppleACPIBatteryManager_b10.zip 220.23KB
144 downloadsUPDATE: 7/29/2008
1. Changed [class AppleACPIBattery] to [class AppleACPIBatteryDevice]. Hopefully, it will fix the random KP due to the duplicated class AppleACPIBattery while ApplePowerSource is also installed at the same time.
2. Tried to fix more than one battery bay issue by using "numBatteriesSupported()" first. When the returned value is more than 1, it will check "_STA" flag. Otherwise, it will skip the "_STA" flag check. Also, rewrote the "_STA" flag check function. (need feedbacks from those who has more than one battery bay in the notebook.)
AppleACPIBatteryManager_b11.zip 220.65KB
400 downloadsUPDATE: 8/11/2008
1. Removed "_UID" flag and related function.
2. Improved battery inserted/removed detection function.
3. Set "fUnitFactor" to 1 if it is read/caculated as 0. (Make sure denominator is not 0)
4. Moved "setExternalChargeCapable" function from "setBatteryBIF" to "setBatteryBST" rountine.
5. Reset "fAverageRate" to 0 when the state of battery changes.
(Now it will show "Calculating" first, then "Time" later, while plugging in or pulling out the AC power, like my MacBook does.
AppleACPIBatteryManager_b12.zip 223.45KB
234 downloadsUPDATE: 8/15/2008
1. Fixed long "Calculating" problem.
AppleACPIBatteryManager_b13.zip 348.12KB
502 downloadsUPDATE: 8/22/2008
1. Tried to fix more than one battery bay issue while ApplePowerSource is also installed at the same time. (need feedbacks)
AppleACPIBatteryManager_b14.zip 222.46KB
1744 downloadsUPDATE: 10/25/2008
1. Fixed the problem that battery meter doesn't show 100% after finished charging.
2. Changed to only read last three bit for "fCurrentRate" in case that the value read from ACPI table is too big.
AppleACPIBatteryManager_b15.zip 450.24KB
11111 downloads



Sign In
Create Account






