Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support 2018 mbp #28

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions HWMonitor/HWMEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,29 @@ - (void)insertSmcFansWithConnection:(io_connect_t)connection keys:(NSSet*)keys
}
}
}
}else {
key = [[NSString alloc] initWithFormat:@KEY_FORMAT_FAN_SPEED,i];
if (kIOReturnSuccess == SMCReadKey(connection, [key cStringUsingEncoding:NSASCIIStringEncoding], &info)) {
NSString *type = [NSString stringWithCString:info.dataType encoding:NSASCIIStringEncoding];
if ([type isEqualToString:@SMC_TYPE_FLT]){
NSString * caption = [[NSString alloc] initWithBytes:info.bytes length:info.dataSize encoding:NSUTF8StringEncoding];

if ([caption length] == 0)
caption = [[NSString alloc] initWithFormat:@"Fan %X", i + 1];

if (![caption hasPrefix:@"GPU "]) {

key = [[NSString alloc] initWithFormat:@KEY_FORMAT_FAN_SPEED,i];

if (kIOReturnSuccess == SMCReadKey(connection, [key cStringUsingEncoding:NSASCIIStringEncoding], &info)) {

type = [NSString stringWithCString:info.dataType encoding:NSASCIIStringEncoding];

[self insertSmcFanWithConnection:connection descriptor:caption name:key type:type title:GetLocalizedString(caption) selector:group.selector.unsignedIntegerValue group:group];
}
}
}
}
}
}

Expand Down
80 changes: 80 additions & 0 deletions HWMonitor/Profiles/MacBookPro15,1.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>TC1C|CPU Core 1</string>
<string>TC2C|CPU Core 2</string>
<string>TC3C|CPU Core 3</string>
<string>TC4C|CPU Core 4</string>
<string>TC5C|CPU Core 5</string>
<string>TC6C|CPU Core 6</string>
<string>TA0V|Ambient</string>
<string>Ts0P|Heatpipe Incoming Air</string>
<string>TC0P|CPU Proximity</string>
<string>TC0E|CPU 1</string>
<string>TC0F|CPU 2</string>
<string>TCHP|Heatsink</string>
<string>TCSC|PECI SA</string>
<string>TCXC|PECI CPU</string>
<string>TCSA|PECI SA</string>
<string>TCGC|PECI GPU</string>
<string>TPCD|PCH Die</string>
<string>TM0P|Memory</string>
<string>Ts0S|System Proximity</string>
<string>Th0N|SSD</string>
<string>TB0T|Battery TS Max</string>
<string>TB1T|Battery 1</string>
<string>TBXT|Battery</string>
<string>TB2T|Battery 2</string>
<string>Th2H|Fan inlet Left</string>
<string>Ts0P|Touchpad</string>
<string>Th1H|Fan inlet Right</string>
<string>Ts1P|Palm</string>
<string>VCFR|CPU FIVR</string>
<string>VD0R|Power Supply</string>
<string>VCAC|CPU</string>
<string>VCGC|Graphic</string>
<string>VG0C|GPU</string>
<string>VP0R|VSDC</string>
<string>IBLR|LCD BL</string>
<string>ICAM|CPU IMON</string>
<string>IO5R|5V</string>
<string>IO3R|3V</string>
<string>ICAC|CPU Fixed</string>
<string>IC0R|Computing High Side</string>
<string>ITAR|TrackPad</string>
<string>ICMC|Camera</string>
<string>ICGC|CPU Graphic</string>
<string>IHCC|PICCOLO</string>
<string>IHNC|NAND</string>
<string>IIDC|T151</string>
<string>ICEC|EDRAM</string>
<string>IG0R|GPU</string>
<string>ID0R|DC in</string>
<string>IO0R|Other High Side</string>
<string>IBKC|KB backlite</string>
<string>ISCC|PCH</string>
<string>IULC|Thunderbolt Left</string>
<string>PSDC|SSD</string>
<string>PAPC|Airport</string>
<string>PM0C|Memory </string>
<string>PC1C|CPU 1.05V</string>
<string>PD0R|Power Supply</string>
<string>PC0R|CPU Rail</string>
<string>PCAC|CPU Process</string>
<string>P03R|3V</string>
<string>P05R|5V</string>
<string>PG0R|GPU </string>
<string>PCPC|CPU Package Cores</string>
<string>PCGM|CPU Memory Controller</string>
<string>PCGC|CPU Graphic</string>
<string>PCPG|CPU Package Graphics</string>
<string>PCPT|CPU Package Total</string>
<string>PM0C|Memory Rail</string>
<string>PN0C|PCH Core</string>
<string>PC0R|Mainboard S0 Rail</string>
<string>PDTR|DC in Total</string>
<string>PSTR|System Total</string>
<string>PCS0|CPU 1.8V</string>
</array>
</plist>
80 changes: 80 additions & 0 deletions HWMonitor/Profiles/MacBookPro15,2.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>TC1C|CPU Core 1</string>
<string>TC2C|CPU Core 2</string>
<string>TC3C|CPU Core 3</string>
<string>TC4C|CPU Core 4</string>
<string>TC5C|CPU Core 5</string>
<string>TC6C|CPU Core 6</string>
<string>TA0V|Ambient</string>
<string>Ts0P|Heatpipe Incoming Air</string>
<string>TC0P|CPU Proximity</string>
<string>TC0E|CPU 1</string>
<string>TC0F|CPU 2</string>
<string>TCHP|Heatsink</string>
<string>TCSC|PECI SA</string>
<string>TCXC|PECI CPU</string>
<string>TCSA|PECI SA</string>
<string>TCGC|PECI GPU</string>
<string>TPCD|PCH Die</string>
<string>TM0P|Memory</string>
<string>Ts0S|System Proximity</string>
<string>Th0N|SSD</string>
<string>TB0T|Battery TS Max</string>
<string>TB1T|Battery 1</string>
<string>TBXT|Battery</string>
<string>TB2T|Battery 2</string>
<string>Th2H|Fan inlet Left</string>
<string>Ts0P|Touchpad</string>
<string>Th1H|Fan inlet Right</string>
<string>Ts1P|Palm</string>
<string>VCFR|CPU FIVR</string>
<string>VD0R|Power Supply</string>
<string>VCAC|CPU</string>
<string>VCGC|Graphic</string>
<string>VG0C|GPU</string>
<string>VP0R|VSDC</string>
<string>IBLR|LCD BL</string>
<string>ICAM|CPU IMON</string>
<string>IO5R|5V</string>
<string>IO3R|3V</string>
<string>ICAC|CPU Fixed</string>
<string>IC0R|Computing High Side</string>
<string>ITAR|TrackPad</string>
<string>ICMC|Camera</string>
<string>ICGC|CPU Graphic</string>
<string>IHCC|PICCOLO</string>
<string>IHNC|NAND</string>
<string>IIDC|T151</string>
<string>ICEC|EDRAM</string>
<string>IG0R|GPU</string>
<string>ID0R|DC in</string>
<string>IO0R|Other High Side</string>
<string>IBKC|KB backlite</string>
<string>ISCC|PCH</string>
<string>IULC|Thunderbolt Left</string>
<string>PSDC|SSD</string>
<string>PAPC|Airport</string>
<string>PM0C|Memory </string>
<string>PC1C|CPU 1.05V</string>
<string>PD0R|Power Supply</string>
<string>PC0R|CPU Rail</string>
<string>PCAC|CPU Process</string>
<string>P03R|3V</string>
<string>P05R|5V</string>
<string>PG0R|GPU </string>
<string>PCPC|CPU Package Cores</string>
<string>PCGM|CPU Memory Controller</string>
<string>PCGC|CPU Graphic</string>
<string>PCPG|CPU Package Graphics</string>
<string>PCPT|CPU Package Total</string>
<string>PM0C|Memory Rail</string>
<string>PN0C|PCH Core</string>
<string>PC0R|Mainboard S0 Rail</string>
<string>PDTR|DC in Total</string>
<string>PSTR|System Total</string>
<string>PCS0|CPU 1.8V</string>
</array>
</plist>
2 changes: 1 addition & 1 deletion Shared/smc.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define SMC_TYPE_SI32 "si32"
#define SMC_TYPE_FLAG "flag"
#define SMC_TYPE_FDS "{fds"
#define SMC_TYPE_FLT "flt"
#define SMC_TYPE_FLT "flt "

#define SMC_TYPE_FPXX_SIZE 2
#define SMC_TYPE_SPXX_SIZE 2
Expand Down