diff --git a/FanControl/FanControllerSensors.cs b/FanControl/FanControllerSensors.cs index 8bf0e16..30af3d4 100644 --- a/FanControl/FanControllerSensors.cs +++ b/FanControl/FanControllerSensors.cs @@ -74,7 +74,7 @@ internal partial class FanController MinInput = 40, MaxInput = 95, A = 1.28f, - B = Settings.Default.Silent4000RPMThreshold - 28, + B = Settings.Default.Silent4000RPMTemp - 28, C = 3000f } }, @@ -110,7 +110,7 @@ internal partial class FanController MinInput = 40, MaxInput = 95, A = 1.28f, - B = Settings.Default.Silent4000RPMThreshold - 28, + B = Settings.Default.Silent4000RPMTemp - 28, C = 3000f } }, diff --git a/FanControl/Settings.cs b/FanControl/Settings.cs index ee52f95..82d769d 100644 --- a/FanControl/Settings.cs +++ b/FanControl/Settings.cs @@ -23,15 +23,20 @@ public bool AlwaysOnTop set { Set("AlwaysOnTop", value); } } - public int Silent4000RPMThreshold + public int Silent4000RPMTemp { - get { return Get("Silent4000RPMThreshold", 85); } - set { Set("Silent4000RPMThreshold", Math.Min(Math.Max(80, value), 90)); } + get { return ClampSilent4000RPMTemp(Get("Silent4000RPMTemp", 85)); } + set { Set("Silent4000RPMTemp", ClampSilent4000RPMTemp(value)); } } public bool EnableExperimentalFeatures { get { return Instance.IsDEBUG; } } + + private int ClampSilent4000RPMTemp(int value) + { + return Math.Clamp(value, 70, 90); + } } }