Skip to content

Commit 77d4379

Browse files
committed
Add Pump Fan 2 for MSI MEG Z790 GODLIKE MAX + handle 0 RPM / unplugged fan
1 parent 69fb2ae commit 77d4379

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

OpenHardwareMonitorLib/Hardware/Motherboard/Lpc/Nct677X.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public Nct677X(LpcPort lpcPort, Chip chip, byte revision, ushort port)
394394
case Chip.NCT6683D:
395395
case Chip.NCT6686D:
396396
case Chip.NCT6687D:
397-
Fans = new float?[17];
397+
Fans = new float?[18];
398398
Controls = new float?[8];
399399
Voltages = new float?[14];
400400
Temperatures = new float?[11];
@@ -455,11 +455,12 @@ public Nct677X(LpcPort lpcPort, Chip chip, byte revision, ushort port)
455455
// SYS Fan 3 on newer NCT6687Ds
456456
// SYS Fan 2 on newer NCT6687Ds
457457
// SYS Fan 1 on newer NCT6687Ds
458+
// PUMP Fan 2 on some NCT6687Ds - 0x850 (e.g. Z790 GODLIKE MAX)
458459
// SYS Fan 7 on some NCT6687Ds - 0x852 (e.g. Z790 GODLIKE MAX)
459-
_fanRpmRegister = [0x140, 0x142, 0x144, 0x146, 0x148, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x852];
460+
_fanRpmRegister = [0x140, 0x142, 0x144, 0x146, 0x148, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x850, 0x852];
460461

461-
// On some boards, there will be SYS Fan 7 (e.g. MSI MEG Z790 GODLIKE MAX)
462-
_fanCountRegister = [0x852];
462+
// On some boards, there will be PUMP Fan 2 and SYS Fan 7 (e.g. MSI MEG Z790 GODLIKE MAX)
463+
_fanCountRegister = [0x850, 0x852];
463464

464465
// max value for 13-bit fan counter
465466
_maxFanCount = 0x1FFF;
@@ -833,6 +834,13 @@ public void Update()
833834

834835
void Update13BitFan(int i, byte low, byte high)
835836
{
837+
// No fan plugged in OR fan is at 0 RPM
838+
if (Chip is Chip.NCT6687D && high == 0xFF && low == 0xF8)
839+
{
840+
Fans[i] = 0;
841+
return;
842+
}
843+
836844
int count = (high << 5) | (low & 0x1F);
837845
if (count < _maxFanCount)
838846
{

OpenHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,13 +558,14 @@ private static void GetBoardSpecificConfiguration
558558

559559
f.Add(new Fan("CPU Fan", 0));
560560
f.Add(new Fan("Pump Fan #1", 1));
561+
f.Add(new Fan("Pump Fan #2", 16));
561562
f.Add(new Fan("System Fan #1", 2));
562563
f.Add(new Fan("System Fan #2", 3));
563564
f.Add(new Fan("System Fan #3", 4));
564565
f.Add(new Fan("System Fan #4", 5));
565566
f.Add(new Fan("System Fan #5", 6));
566567
f.Add(new Fan("System Fan #6", 7));
567-
f.Add(new Fan("System Fan #7", 16));
568+
f.Add(new Fan("System Fan #7", 17));
568569

569570
c.Add(new Control("CPU Fan", 0));
570571
c.Add(new Control("Pump Fan #1", 1));

0 commit comments

Comments
 (0)