mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2025-12-06 07:12:01 +01:00
FanControl: Support OLED BIOS 107 with temperature readings
This commit is contained in:
parent
fe644f3e48
commit
9c7c7bfd1d
|
|
@ -12,7 +12,7 @@ namespace FanControl
|
||||||
"APU", new FanSensor()
|
"APU", new FanSensor()
|
||||||
{
|
{
|
||||||
// TODO: Is this correct?
|
// TODO: Is this correct?
|
||||||
HardwareName = "AMD Custom APU 0405",
|
HardwareNames = { "AMD Custom APU 0405", "AMD Custom APU 0932" },
|
||||||
HardwareType = HardwareType.Cpu,
|
HardwareType = HardwareType.Cpu,
|
||||||
SensorName = "Package",
|
SensorName = "Package",
|
||||||
SensorType = SensorType.Power,
|
SensorType = SensorType.Power,
|
||||||
|
|
@ -48,7 +48,7 @@ namespace FanControl
|
||||||
{
|
{
|
||||||
"CPU", new FanSensor()
|
"CPU", new FanSensor()
|
||||||
{
|
{
|
||||||
HardwareName = "AMD Custom APU 0405",
|
HardwareNames = { "AMD Custom APU 0405", "AMD Custom APU 0932" },
|
||||||
HardwareType = HardwareType.Cpu,
|
HardwareType = HardwareType.Cpu,
|
||||||
SensorName = "Core (Tctl/Tdie)",
|
SensorName = "Core (Tctl/Tdie)",
|
||||||
SensorType = SensorType.Temperature,
|
SensorType = SensorType.Temperature,
|
||||||
|
|
@ -84,11 +84,12 @@ namespace FanControl
|
||||||
{
|
{
|
||||||
"GPU", new FanSensor()
|
"GPU", new FanSensor()
|
||||||
{
|
{
|
||||||
HardwareName = "AMD Custom GPU 0405",
|
HardwareNames = { "AMD Custom GPU 0405", "AMD Custom GPU 0932" },
|
||||||
HardwareType = HardwareType.GpuAmd,
|
HardwareType = HardwareType.GpuAmd,
|
||||||
SensorName = "GPU Core",
|
SensorName = "GPU Core",
|
||||||
SensorType = SensorType.Temperature,
|
SensorType = SensorType.Temperature,
|
||||||
ValueDeadZone = 0.0f,
|
ValueDeadZone = 0.0f,
|
||||||
|
InvalidValue = 5.0f,
|
||||||
AvgSamples = 20,
|
AvgSamples = 20,
|
||||||
Profiles = new Dictionary<FanMode, FanSensor.Profile>()
|
Profiles = new Dictionary<FanMode, FanSensor.Profile>()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,11 @@ namespace FanControl
|
||||||
|
|
||||||
public float ValueDeadZone { get; set; }
|
public float ValueDeadZone { get; set; }
|
||||||
public int AvgSamples { get; set; } = 5;
|
public int AvgSamples { get; set; } = 5;
|
||||||
|
public float InvalidValue { get; set; } = 0.0f;
|
||||||
public float? MaxValue { get; set; }
|
public float? MaxValue { get; set; }
|
||||||
|
|
||||||
internal string HardwareName { get; set; } = "";
|
internal string HardwareName { get; set; } = "";
|
||||||
|
internal IList<string> HardwareNames { get; set; } = new List<string>();
|
||||||
internal HardwareType HardwareType { get; set; }
|
internal HardwareType HardwareType { get; set; }
|
||||||
internal string SensorName { get; set; } = "";
|
internal string SensorName { get; set; } = "";
|
||||||
internal SensorType SensorType { get; set; }
|
internal SensorType SensorType { get; set; }
|
||||||
|
|
@ -132,11 +134,29 @@ namespace FanControl
|
||||||
CalculatedRPM = 0;
|
CalculatedRPM = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool MatchesHardwareName(string sensorHardwareName)
|
||||||
|
{
|
||||||
|
if (HardwareNames.Count > 0)
|
||||||
|
{
|
||||||
|
if (HardwareNames.Any(hardwareName => sensorHardwareName.StartsWith(hardwareName)))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Empty string matches always
|
||||||
|
if (HardwareName.Length == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (sensorHardwareName.StartsWith(HardwareName))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public bool Matches(ISensor sensor)
|
public bool Matches(ISensor sensor)
|
||||||
{
|
{
|
||||||
return sensor != null &&
|
return sensor != null &&
|
||||||
sensor.Hardware.HardwareType == HardwareType &&
|
sensor.Hardware.HardwareType == HardwareType &&
|
||||||
sensor.Hardware.Name.StartsWith(HardwareName) &&
|
MatchesHardwareName(sensor.Hardware.Name) &&
|
||||||
sensor.SensorType == SensorType &&
|
sensor.SensorType == SensorType &&
|
||||||
sensor.Name == SensorName;
|
sensor.Name == SensorName;
|
||||||
}
|
}
|
||||||
|
|
@ -156,7 +176,7 @@ namespace FanControl
|
||||||
|
|
||||||
public bool Update(string name, float? newValue, FanMode mode)
|
public bool Update(string name, float? newValue, FanMode mode)
|
||||||
{
|
{
|
||||||
if (!newValue.HasValue || newValue <= 0.0)
|
if (!newValue.HasValue || newValue <= InvalidValue)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (MaxValue.HasValue)
|
if (MaxValue.HasValue)
|
||||||
|
|
@ -210,8 +230,8 @@ namespace FanControl
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
String value = "";
|
String value = "";
|
||||||
|
|
||||||
if (AllSamples.Count > 0)
|
if (AllSamples.Count > 0)
|
||||||
value += AllSamples.Last().ToString("F1") + Unit();
|
value += AllSamples.Last().ToString("F1") + Unit();
|
||||||
|
|
||||||
value += " (avg: " + Value.Value.ToString("F1") + Unit() + ")";
|
value += " (avg: " + Value.Value.ToString("F1") + Unit() + ")";
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ namespace PerformanceOverlay
|
||||||
"CPU_%", new HardwareSensor()
|
"CPU_%", new HardwareSensor()
|
||||||
{
|
{
|
||||||
HardwareType = HardwareType.Cpu,
|
HardwareType = HardwareType.Cpu,
|
||||||
HardwareName = "AMD Custom APU 0405",
|
HardwareNames = { "AMD Custom APU 0405", "AMD Custom APU 0932" },
|
||||||
SensorType = SensorType.Load,
|
SensorType = SensorType.Load,
|
||||||
SensorName = "CPU Total",
|
SensorName = "CPU Total",
|
||||||
Format = "F0"
|
Format = "F0"
|
||||||
|
|
@ -175,7 +175,7 @@ namespace PerformanceOverlay
|
||||||
"CPU_W", new HardwareSensor()
|
"CPU_W", new HardwareSensor()
|
||||||
{
|
{
|
||||||
HardwareType = HardwareType.Cpu,
|
HardwareType = HardwareType.Cpu,
|
||||||
HardwareName = "AMD Custom APU 0405",
|
HardwareNames = { "AMD Custom APU 0405", "AMD Custom APU 0932" },
|
||||||
SensorType = SensorType.Power,
|
SensorType = SensorType.Power,
|
||||||
SensorName = "Package",
|
SensorName = "Package",
|
||||||
Format = "F1"
|
Format = "F1"
|
||||||
|
|
@ -185,7 +185,7 @@ namespace PerformanceOverlay
|
||||||
"CPU_T", new HardwareSensor()
|
"CPU_T", new HardwareSensor()
|
||||||
{
|
{
|
||||||
HardwareType = HardwareType.Cpu,
|
HardwareType = HardwareType.Cpu,
|
||||||
HardwareName = "AMD Custom APU 0405",
|
HardwareNames = { "AMD Custom APU 0405", "AMD Custom APU 0932" },
|
||||||
SensorType = SensorType.Temperature,
|
SensorType = SensorType.Temperature,
|
||||||
SensorName = "Core (Tctl/Tdie)",
|
SensorName = "Core (Tctl/Tdie)",
|
||||||
Format = "F1",
|
Format = "F1",
|
||||||
|
|
@ -201,7 +201,7 @@ namespace PerformanceOverlay
|
||||||
return new HardwareSensor()
|
return new HardwareSensor()
|
||||||
{
|
{
|
||||||
HardwareType = HardwareType.Cpu,
|
HardwareType = HardwareType.Cpu,
|
||||||
HardwareName = "AMD Custom APU 0405",
|
HardwareNames = { "AMD Custom APU 0405", "AMD Custom APU 0932" },
|
||||||
SensorType = SensorType.Clock,
|
SensorType = SensorType.Clock,
|
||||||
SensorName = "Core #" + index.ToString(),
|
SensorName = "Core #" + index.ToString(),
|
||||||
Format = "F0",
|
Format = "F0",
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,11 @@
|
||||||
|
|
||||||
[**READ IF PLAYING ONLINE GAMES AND/OR GAMES THAT HAVE ANTI-CHEAT ENABLED**](https://steam-deck-tools.ayufan.dev/#anti-cheat-and-antivirus-software)
|
[**READ IF PLAYING ONLINE GAMES AND/OR GAMES THAT HAVE ANTI-CHEAT ENABLED**](https://steam-deck-tools.ayufan.dev/#anti-cheat-and-antivirus-software)
|
||||||
|
|
||||||
## SteamDeck OLED support
|
|
||||||
|
|
||||||
- There's incorrect CPU temperature reading
|
|
||||||
- There's a lack of GPU frequency reading
|
|
||||||
|
|
||||||
## #{GIT_TAG_NAME}
|
## #{GIT_TAG_NAME}
|
||||||
|
|
||||||
## 0.7.1
|
## 0.7.1
|
||||||
|
|
||||||
- SteamDeck OLED: Support bios 107
|
- SteamDeck OLED: Support Bios 107 with temperature readings
|
||||||
|
|
||||||
## 0.7.0
|
## 0.7.0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue