Jump to content

AppleSmartBatteryManager(mini) for ML and Lion 1.0

Sign in to follow this  

About This File

Hello. I made new SmartBattery of these sourses.

https://github.com/RehabMan/OS-X-ACPI-Battery-Driver

The new driver working better and it has smaller size. Just 81 kb

---------------------

Hi. I added to SmartBattery the one thing -> Approximation of the number of cycles.

It gives me condition my battery

I found on AppleSmartBattery.cpp this thing

 //rehabman: zprood's technique of expanding the _BIF to include cycle count
uint32_t cycleCnt = 0;
if (acpibat_bif->getCount() > BIF_CYCLE_COUNT) {
cycleCnt = GetValueFromArray(acpibat_bif, BIF_CYCLE_COUNT);
}
setCycleCount(cycleCnt);

correct cycleCnt = 0 to -1, and remove setCycleCount(cycleCnt);

Because the actual number of cycles can be 0, if the battery is new, but the -1 is unlikely.

then add

/* If the cycle count can not be obtained through _BIF, 
it will be estimated according to the design capacity and maximum capacity,
otherwise will be set based on the acquired cycle count from _BIF*/
if (-1 == cycleCnt) {
if (fDesignCapacity > fMaxCapacity) {
setCycleCount((fDesignCapacity - fMaxCapacity) / 7);
} else {
setCycleCount((fMaxCapacity - fDesignCapacity) / 7);
}
} else {
setCycleCount(cycleCnt);
}

Add my DSDT, see Device (BAT0)

------

Updated battery kext from 1.31 to 1.32




User Feedback

Recommended Comments

YouDoMeIDoYou

Hello. I deem you should have AMD Mobility Radeon HD 6470M. Could you tell me whether DVDPlayer working with battery.? Moreover, Are DVDPlayer playing any movie?.

In my case, In ML my DVDPlayer doesn't work with any battery-kext even with VoodooBattery. But in Lion was be OK.

Share this comment


Link to comment
Share on other sites

Alex009988

I am sorry. I have a Travelmate 7750 with Intel HD3000, not Aspire 7750g with Radeon graphics. I actually changed my 17" display in order to get distortions and system hangups with onboard Intel under control.

Share this comment


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.