Add FanControl.ChromeboxEC plugin, project background, ectool docs

- Add FanControl.ChromeboxEC plugin for Fan Control
- Add project background/缘由 in README (EN/zh)
- Add docs/ectool-commands-zh.md
- Update sln, appsettings, gitignore

Made-with: Cursor
This commit is contained in:
2026-03-22 15:15:02 +08:00
parent e8c8a759e0
commit 111eb22824
15 changed files with 928 additions and 3 deletions

View File

@@ -0,0 +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;
}
}