日常更新

This commit is contained in:
jack
2026-04-02 18:32:43 +08:00
parent 111eb22824
commit bc1e86d4ea
32 changed files with 2745 additions and 2742 deletions

View File

@@ -1,27 +1,27 @@
using FanControl.Plugins;
namespace FanControl.ChromeboxEC;
/// <summary>温度ectool temps &lt;sensorid&gt;</summary>
public sealed class ChromeboxECTempSensor : IPluginSensor
{
private readonly string _ectoolPath;
private readonly string[] _tempArgs;
public ChromeboxECTempSensor(string ectoolPath, string[] tempArgs)
{
_ectoolPath = ectoolPath;
_tempArgs = tempArgs;
}
public string Id => "ChromeboxEC_Temp";
public string Name => "Chromebox EC Temperature";
public string Origin => "ectool temps";
public float? Value { get; private set; }
public void Update()
{
var (ok, stdout, _) = EctoolRunner.Run(_ectoolPath, _tempArgs);
Value = ok && EctoolRunner.TryParseTemp(stdout) is { } temp ? temp : null;
}
}
using FanControl.Plugins;
namespace FanControl.ChromeboxEC;
/// <summary>温度ectool temps &lt;sensorid&gt;</summary>
public sealed class ChromeboxECTempSensor : IPluginSensor
{
private readonly string _ectoolPath;
private readonly string[] _tempArgs;
public ChromeboxECTempSensor(string ectoolPath, string[] tempArgs)
{
_ectoolPath = ectoolPath;
_tempArgs = tempArgs;
}
public string Id => "ChromeboxEC_Temp";
public string Name => "Chromebox EC Temperature";
public string Origin => "ectool temps";
public float? Value { get; private set; }
public void Update()
{
var (ok, stdout, _) = EctoolRunner.Run(_ectoolPath, _tempArgs);
Value = ok && EctoolRunner.TryParseTemp(stdout) is { } temp ? temp : null;
}
}