Update temp.inc.sh

This commit is contained in:
2025-03-09 12:12:24 -05:00
parent 2ef745146a
commit 19aa7b0875

View File

@@ -118,6 +118,7 @@ CHECKTEMP(){
[ ${REPORT} -eq 0 ] && echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Pulling data ... "
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
echo $(CHECKTEMPSENSOR ${SENSOR})
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
if [ "${temp_f}" != "timeout" ] && [ "${temp_f}" != "offline" ]; then
[ "${PW_SENSOR_TYPE[${SENSOR}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]] && temp_f_disp=$(IDS_NUMBER_FORMAT ${temp_f} 0) || temp_f_disp=${temp_f}
@@ -730,7 +731,6 @@ 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
@@ -738,7 +738,6 @@ 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