#168 - try again with TC0C smc key

This commit is contained in:
Jos Dehaes 2021-11-28 21:50:49 +01:00
parent 7d20ab3c36
commit bcc0acf9f2
2 changed files with 7 additions and 1 deletions

View file

@ -63,6 +63,11 @@ namespace Cpu {
snprintf(key, 5, "TC%1dc", core);
}
result = SMCReadKey(key, &val);
if (result != kIOReturnSuccess) {
// try again with C
snprintf(key, 5, "TC%1dC", core);
result = SMCReadKey(key, &val);
}
if (result == kIOReturnSuccess) {
if (strcmp(val.dataType, DATATYPE_SP78) == 0) {
// convert sp78 value to temperature

View file

@ -25,7 +25,8 @@
#define DATATYPE_SP78 "sp78"
// key values
#define SMC_KEY_CPU_TEMP "TC0P"
#define SMC_KEY_CPU_TEMP "TC0P" // proximity temp?
#define SMC_KEY_CPU_DIE_TEMP "TC0D" // die temp?
#define SMC_KEY_CPU1_TEMP "TC1C"
#define SMC_KEY_CPU2_TEMP "TC2C" // etc
#define SMC_KEY_FAN0_RPM_CUR "F0Ac"