Update temp.inc.sh

This commit is contained in:
2025-03-09 12:10:32 -05:00
parent f00ce913e9
commit 2ef745146a

View File

@@ -730,6 +730,7 @@ CHECKTEMPSENSOR(){
if [ "${1}" == "ServerRoomTH" ]; then
temp_f=`echo "scale=2; (${temp_c}*(9/5))+32+${PW_ServerRoomTH_Dev}" | bc`
else
echo $temp_c
if [ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ]; then
temp_f=$(echo "scale=2; $temp_c/1" | bc -l)
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ] && [[ "${1}" = *"FAN"* ]]; then
@@ -737,6 +738,7 @@ CHECKTEMPSENSOR(){
elif [ "${temp_f}" == "" ]; then
temp_f=$(bc <<< "scale=2; (${temp_c}*(9/5))+32")
fi
echo $temp_f
(( $(bc <<<"${temp_f} < 1") )) && [[ "${temp_f}" = *"."* ]] && temp_f="0${temp_f}"
fi