Skip to content

Commit

Permalink
Merge pull request #33 from kyleyannelli/m2-12core-sensors
Browse files Browse the repository at this point in the history
fix: add missing sensors for M2 12 Core chip
  • Loading branch information
narugit authored Aug 13, 2024
2 parents dc5a607 + 9bdc7ae commit b0aba09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions smctemp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@ double SmcTemp::GetCpuTemp() {
// CPU core 8
sensors.emplace_back(static_cast<std::string>(kSensorTp0r));
} else if (cpumodel.find("m2") != std::string::npos) { // Apple M2
// CPU efficient cores 1 through 4 on M2 Max 12 Core Chip
sensors.emplace_back(static_cast<std::string>(kSensorTp1h));
sensors.emplace_back(static_cast<std::string>(kSensorTp1t));
sensors.emplace_back(static_cast<std::string>(kSensorTp1p));
sensors.emplace_back(static_cast<std::string>(kSensorTp1l));

// CPU core 1
sensors.emplace_back(static_cast<std::string>(kSensorTp01));
// CPU core 2
Expand Down
4 changes: 4 additions & 0 deletions smctemp.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ constexpr UInt32Char_t kSensorTp0f = "Tp0f";
constexpr UInt32Char_t kSensorTp0j = "Tp0j";
constexpr UInt32Char_t kSensorTp0n = "Tp0n";
constexpr UInt32Char_t kSensorTp0r = "Tp0r";
constexpr UInt32Char_t kSensorTp1h = "Tp1h";
constexpr UInt32Char_t kSensorTp1t = "Tp1t";
constexpr UInt32Char_t kSensorTp1p = "Tp1p";
constexpr UInt32Char_t kSensorTp1l = "Tp1l";
// GPU
constexpr UInt32Char_t kSensorTg05 = "Tg05";
constexpr UInt32Char_t kSensorTg0D = "Tg0D";
Expand Down

0 comments on commit b0aba09

Please sign in to comment.