From bf2974784dc07435c7d99684c69fb609f6d2f515 Mon Sep 17 00:00:00 2001 From: Lukas Schreiner <63263101+0LS0@users.noreply.github.com> Date: Thu, 28 Apr 2022 19:02:03 +0200 Subject: [PATCH] Add EC sensors and fan names for ASUS Z170-A (#700) Thanks @0LS0! --- .../Motherboard/Lpc/EC/EmbeddedController.cs | 8 ++++++++ .../Hardware/Motherboard/SuperIOHardware.cs | 13 +++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/LibreHardwareMonitorLib/Hardware/Motherboard/Lpc/EC/EmbeddedController.cs b/LibreHardwareMonitorLib/Hardware/Motherboard/Lpc/EC/EmbeddedController.cs index 101517b..b3a069e 100644 --- a/LibreHardwareMonitorLib/Hardware/Motherboard/Lpc/EC/EmbeddedController.cs +++ b/LibreHardwareMonitorLib/Hardware/Motherboard/Lpc/EC/EmbeddedController.cs @@ -31,6 +31,8 @@ namespace LibreHardwareMonitor.Hardware.Motherboard.Lpc.EC FanVrmHS, /// Chipset fan [RPM] FanChipset, + /// Water Pump [RPM] + FanWaterPump, /// Water flow sensor reading [RPM] FanWaterFlow, /// CPU current [A] @@ -52,6 +54,7 @@ namespace LibreHardwareMonitor.Hardware.Motherboard.Lpc.EC { ECSensor.FanCPUOpt, new EmbeddedControllerSource("CPU Optional Fan", SensorType.Fan, 0x00b0, 2) }, { ECSensor.FanVrmHS, new EmbeddedControllerSource("VRM Heat Sink Fan", SensorType.Fan, 0x00b2, 2) }, { ECSensor.FanChipset, new EmbeddedControllerSource("Chipset Fan", SensorType.Fan, 0x00b4, 2) }, + { ECSensor.FanWaterPump, new EmbeddedControllerSource("Water Pump", SensorType.Fan, 0x00bc, 2) }, // TODO: "why 42?" is a silly question, I know, but still, why? On the serious side, it might be 41.6(6) { ECSensor.FanWaterFlow, new EmbeddedControllerSource("Water flow", SensorType.Flow, 0x00bc, 2, factor: 1.0f / 42f * 60f) }, { ECSensor.CurrCPU, new EmbeddedControllerSource("CPU", SensorType.Current, 0x00f4) }, @@ -133,6 +136,11 @@ namespace LibreHardwareMonitor.Hardware.Motherboard.Lpc.EC Model.ROG_STRIX_Z690_A_GAMING_WIFI_D4, new ECSensor[] { ECSensor.TempTSensor, ECSensor.TempVrm } + }, + { + Model.Z170_A, + new ECSensor[] { + ECSensor.TempTSensor, ECSensor.TempChipset, ECSensor.FanWaterPump, ECSensor.CurrCPU } } }; diff --git a/LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs b/LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs index cc4e753..1c9ccf5 100644 --- a/LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs +++ b/LibreHardwareMonitorLib/Hardware/Motherboard/SuperIOHardware.cs @@ -2572,11 +2572,16 @@ namespace LibreHardwareMonitor.Hardware.Motherboard t.Add(new Temperature("Temperature #4", 5)); t.Add(new Temperature("Temperature #5", 6)); - for (int i = 0; i < superIO.Fans.Length; i++) - f.Add(new Fan("Fan #" + (i + 1), i)); + // CPU Fan Optional uses the same fancontrol as CPU Fan. + // Water Pump speed can only be read from the EC. + string[] fanNames = { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "CPU Fan Optional" }; + string[] fanControlNames = { "Chassis Fan 1", "CPU Fan", "Chassis Fan 2", "Chassis Fan 3", "Chassis Fan 4", "Water Pump" }; - for (int i = 0; i < superIO.Controls.Length; i++) - c.Add(new Ctrl("Fan Control #" + (i + 1), i)); + for (int i = 0; i < fanNames.Length; i++) + f.Add(new Fan(fanNames[i], i)); + + for (int i = 0; i < fanControlNames.Length; i++) + c.Add(new Ctrl(fanControlNames[i] + " Control", i)); break; }