It looks mostly right except for "Amperage"?
View attachment 135355
Edit: And how do we fix that battery icon crashing? Is that because I'm using the Debug version vs Release?
4/25/15 6:35:08.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate is ACPI_UNKNOWN
The console shows...
Here's something interesting in HWMonitor... Notice the internal battery reading.
View attachment 135359
if (fCurrentRate == ACPI_UNKNOWN)
{
DEBUG_LOG("AppleSmartBattery::setBatteryBST: fCurrentRate is ACPI_UNKNOWN\n");
}
[b]else if[/b] (WATTS == fPowerUnit && fDesignVoltage)
{
// Watts = Amps X Volts
DEBUG_LOG("AppleSmartBattery::setBatteryBST: Calculating for WATTS\n");
fCurrentRate = ((int)fCurrentRate * 1000) / fDesignVoltage;
fCurrentCapacity = (fCurrentCapacity * 1000) / fDesignVoltage;
DEBUG_LOG("AppleSmartBattery::setBatteryBST: fCurrentRate = %d\n", (int)fCurrentRate);
DEBUG_LOG("AppleSmartBattery::setBatteryBST: fCurrentCapacity = %d\n", (int)fCurrentCapacity);
}
Looks like it. I'm trying to trace where that gets set, but as You can guess, not having much success. I can write C# code in sleep...and yet give me a DSDT and I'm like a bumbling fool. Go figure.
Store (ECG2 (), Local2)
ECWB (0x03, Arg0)
Store (ECRB (0x10), Index (Arg1, Zero))
Store (ECRW (0x12), Local0)
If (LEqual (Local0, Zero))
{
Increment (Local0)
}
Else
{
If (LNotEqual (Local2, Zero))
{
If (And (Local0, 0x8000))
{
[B]Store (Ones, Local0)[/B]
}
}
Else
{
If (And (Local0, 0x8000))
{
Subtract (Zero, Local0, Local0)
And (Local0, 0xFFFF, Local0)
}
Else
{
[B]Store (Ones, Local0)[/B]
}
}
}
Store (Local0, Index (Arg1, One))
#define ACPI_UNKNOWN 0xFFFFFFFF
Store (ECG2 (), Local2)
\rmdt.p2("ECG2() returns", Local2)
ECWB (0x03, Arg0)
Store (ECRB (0x10), Index (Arg1, Zero))
Store (ECRW (0x12), Local0)
\rmdt.p2("ECRW(0x12) returns", Local0)
If (LEqual (Local0, Zero))
{
Increment (Local0)
}
Else
{
If (LNotEqual (Local2, Zero))
{
If (And (Local0, 0x8000))
{
[B]Store (Ones, Local0)[/B]
}
}
Else
{
If (And (Local0, 0x8000))
{
Subtract (Zero, Local0, Local0)
And (Local0, 0xFFFF, Local0)
}
Else
{
[B]Store (Ones, Local0)[/B]
}
}
}
\rmdt.p2("CurrentCapacity is", Local0)
Store (Local0, Index (Arg1, One))