diff --git a/smctemp.cc b/smctemp.cc index 5ae07eb..017092d 100755 --- a/smctemp.cc +++ b/smctemp.cc @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -403,9 +404,19 @@ double SmcTemp::GetCpuTemp() { temp += smc_accessor_.ReadValue(sensor.c_str()); } temp /= sensors.size(); - if (temp < 110.0) { + if (temp > std::numeric_limits::epsilon()) { return temp; } + std::vector aux_sensors{ + static_cast(kSensorTc0a), + static_cast(kSensorTc0b), + static_cast(kSensorTc0x), + static_cast(kSensorTc0z), + }; + for (auto sensor : aux_sensors) { + temp += smc_accessor_.ReadValue(sensor.c_str()); + } + temp /= aux_sensors.size(); #endif return temp; } diff --git a/smctemp.h b/smctemp.h index 1646e31..e143b44 100755 --- a/smctemp.h +++ b/smctemp.h @@ -50,6 +50,10 @@ constexpr UInt32Char_t kSensorTc0e = "TC0E"; // CPU PECI die filtered temperatur constexpr UInt32Char_t kSensorTc0f = "TC0F"; // CPU PECI die temperature filtered then adjusted constexpr UInt32Char_t kSensorTc0p = "TC0P"; // CPU proximity temperature #elif defined(ARCH_TYPE_ARM64) +constexpr UInt32Char_t kSensorTc0a = "Tc0a"; +constexpr UInt32Char_t kSensorTc0b = "Tc0b"; +constexpr UInt32Char_t kSensorTc0x = "Tc0x"; +constexpr UInt32Char_t kSensorTc0z = "Tc0z"; constexpr UInt32Char_t kSensorTp01 = "Tp01"; // CPU performance core 1 temperature constexpr UInt32Char_t kSensorTp05 = "Tp05"; // CPU performance core 2 temperature constexpr UInt32Char_t kSensorTp0d = "Tp0D"; // CPU performance core 3 temperature