Files
Blacktempel 9af84004a5 Add MSI controller for AIOs. (#2207)
* Add MSI controller for AIOs.
Fan RPM read, thermal sensor & fan control.

* PR comments & rename controller.

* PR review

* PR review

* PR review
2026-02-11 12:39:29 +01:00

27 lines
834 B
C#

// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Copyright (C) Florian K. (Blacktempel)
// All Rights Reserved.
namespace LibreHardwareMonitor.Hardware.Controller.MSI;
internal delegate float GetMsiSensorValue(MsiFanControl msi);
internal class MsiSensor : Sensor
{
private readonly GetMsiSensorValue _getValue;
public MsiSensor(string name, int index, SensorType sensorType, Hardware hardware, ISettings settings, GetMsiSensorValue getValue)
: base(name, index, sensorType, hardware, settings)
{
_getValue = getValue;
}
internal void Update(MsiFanControl msi)
{
float value = _getValue(msi);
Value = value;
}
}