Ahoj,
I have installed release version v3.02 if your script.
Examining the script, I spotted something bogous (it does not really makes a functioning error except that it adds an additional 0.5 seconds to the "Unthrottle if cool." loop, but the comment does not coincides with the function, so the bug is the discrepancy between function and comment):
temp-throttle, currently around line 222, there is in the main loop:
[...]
# START MAIN LOOP.
while true; do
get_temp # Gets the current temperature and set it to the variable TEMP.
if [[ $TEMP -gt $MAX_TEMP && $CURRENT_FREQ -lt $FREQ_LIST_LEN ]]; then
# Throttle if too hot.
throttle
sleep 0.5; continue # Fast react when temperature overheating.
elif [[ $TEMP -le $LOW_TEMP && $CURRENT_FREQ -ne 1 ]]; then
# Unthrottle if cool.
unthrottle
sleep 0.5 # Fast react when temperature cooling.
fi
# Sleep wait between checking temperatures.
sleep $INTERVAL || err_exit "Sleep wait INTERVAL must be an integer or float value: $INTERVAL"
done
While in the "Throttle if too hot"-loop there is a continue after the sleep 0.5, which leads to fast reacting, in the "Unthrottle if cool." loop there is no such continue, leading to sleep $INTERVAL after the sleep 0.5.
But the comment says # Fast react when temperature cooling. -- which actually is not what happens here.
I propose two mutually exclusive patches which try to solve this issue:
Regards!
Ahoj,
I have installed release version v3.02 if your script.
Examining the script, I spotted something bogous (it does not really makes a functioning error except that it adds an additional 0.5 seconds to the "Unthrottle if cool." loop, but the comment does not coincides with the function, so the bug is the discrepancy between function and comment):
temp-throttle, currently around line 222, there is in the main loop:While in the "Throttle if too hot"-loop there is a
continueafter thesleep 0.5, which leads to fast reacting, in the "Unthrottle if cool." loop there is no suchcontinue, leading tosleep $INTERVALafter thesleep 0.5.But the comment says
# Fast react when temperature cooling.-- which actually is not what happens here.I propose two mutually exclusive patches which try to solve this issue:
Regards!