mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-30 05:48:07 +00:00
(marius) optimization
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2182 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
parent
7baac5cdef
commit
324c738f9c
@ -141,7 +141,7 @@ function UpdateFanSpeeds {
|
|||||||
then pwmval=255 # at specified maxtemp switch to 100%
|
then pwmval=255 # at specified maxtemp switch to 100%
|
||||||
else
|
else
|
||||||
# calculate the new value from temperature and settings
|
# calculate the new value from temperature and settings
|
||||||
pwmval=`calc "((10/(${maxt}-${mint})*(${tval}-${mint}))^2/100*(255-${minso})+${minso})" |cut -d'.' -f1`
|
pwmval=`calc "(((${maxt}-${mint})*(${tval}-${mint}))^2*(255-${minso})+${minso})" |cut -d'.' -f1`
|
||||||
if [ $pwmpval -eq 0 ]
|
if [ $pwmpval -eq 0 ]
|
||||||
then # if fan was stopped start it using a safe value
|
then # if fan was stopped start it using a safe value
|
||||||
echo $minsa > $pwmo
|
echo $minsa > $pwmo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user