diff --git a/CHANGES b/CHANGES index dd57a07c..2cf39801 100644 --- a/CHANGES +++ b/CHANGES @@ -29,6 +29,7 @@ SVN HEAD Check for configuration file validity Support optional min and max PWM values Better integration with init scripts + Use linear control instead of quadratic Program pwmconfig: Use smaller steps for low PWM values Support optional min and max PWM values Program rrd: Support only hwmon class devices diff --git a/doc/fancontrol.txt b/doc/fancontrol.txt index 25f8afb1..eee5bf49 100644 --- a/doc/fancontrol.txt +++ b/doc/fancontrol.txt @@ -120,16 +120,14 @@ fancontrol first reads its configuration, writes it to arrays and loops its main function. This function gets the temperatures and fanspeeds from kernel driver files and calculates new speeds depending on temperature changes, but only if the temp is between MINTEMP and MAXTEMP. After that, the -new values are written to the pwm outputs. Currently the speed increases -quadratically with rising temperature. This way you won't hear your fans most -of the time at best. +new values are written to the pwm outputs. The pwm value increases +linearly with rising temperature. Planned features rc-scripts for some gnu/linux-distributions smoother regulation (temp interpolation) -other curve styles (linear, exponential) gui for configuration If you have other wishes or want to contribute something, please let me know: diff --git a/prog/pwm/fancontrol b/prog/pwm/fancontrol index 107da10a..448b3d47 100755 --- a/prog/pwm/fancontrol +++ b/prog/pwm/fancontrol @@ -324,7 +324,7 @@ function UpdateFanSpeeds { then pwmval=$maxpwm # over max temp, use defined max pwm else # calculate the new value from temperature and settings - let pwmval="((${tval}-${mint})**2)*(${maxpwm}-${minso})/((${maxt}-${mint})**2)+${minso}" + let pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}" if [ $pwmpval -eq 0 -o $fanval -eq 0 ] then # if fan was stopped start it using a safe value echo $minsa > $pwmo diff --git a/prog/pwm/fancontrol.pl b/prog/pwm/fancontrol.pl index cb7327bc..fe7f68b4 100755 --- a/prog/pwm/fancontrol.pl +++ b/prog/pwm/fancontrol.pl @@ -390,7 +390,7 @@ sub UpdateFanSpeeds() { $pwmval = MAX; } else { - $pwmval = eval ( ($tval - $mint) / ($maxt - $mint) )**2 ; + $pwmval = eval ( ($tval - $mint) / ($maxt - $mint) ); $pwmval *= (255 - $minso); $pwmval += $minso; $pwmval = int($pwmval);