Update temp.inc.sh

This commit is contained in:
2024-04-22 20:49:56 -05:00
parent 11eda7dd97
commit 427f8e96fd

View File

@@ -139,16 +139,16 @@ CHECKTEMP(){
fi
if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 ]; then
if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)-${PW_TEMPIND_DIFF}" | bc)") -eq 1 ]; then
reading="${reading} ${idsCL[LightCyan]}\u23F9 "
reading="${reading}${idsCL[LightCyan]}\u23F9 "
elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
reading="${reading} ${idsCL[LightRed]}\u25B2 "
reading="${reading}${idsCL[LightRed]}\u25B2 "
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)") -eq 1 ]; then
reading="${reading} ${idsCL[LightGreen]}\u25BC "
else
reading="${reading} "
reading="${reading} "
fi
else
reading="${reading} "
reading="${reading} "
fi
elif [ "${avgdays}" = "noavg" ]; then
reading="${reading} "
@@ -192,7 +192,7 @@ CHECKTEMP(){
fws=10
tmp="${spca}${average_disp}${GAUGESH}"
else
fws=15
fws=16
tmp="${spct}${temp_f_disp}${GAUGESH}"
fi
c=0; spc=''; spc1=`expr ${fws} - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
@@ -327,16 +327,16 @@ CHECKTEMP(){
fi
if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 ]; then
if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)-${PW_TEMPIND_DIFF}" | bc)") -eq 1 ]; then
echo -en " ${idsCL[LightCyan]}\u23F9 "
echo -en "${idsCL[LightCyan]}\u23F9 "
elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
echo -en " ${idsCL[LightRed]}\u25B2 "
echo -en "${idsCL[LightRed]}\u25B2 "
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)") -eq 1 ]; then
echo -en " ${idsCL[LightGreen]}\u25BC "
echo -en "${idsCL[LightGreen]}\u25BC "
else
echo -en " "
echo -en " "
fi
else
echo -en " "
echo -en " "
fi
elif [ "${avgdays}" = "noavg" ]; then
echo -en " "
@@ -360,7 +360,7 @@ CHECKTEMP(){
fi
if [ "${average}" != "" ] || [ "${temp_f}" != "" ]; then
[ "${average}" != "" ] && fws=11 || fws=15
[ "${average}" != "" ] && fws=11 || fws=16
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
if [ "${TTYPE}" == "fans" ]; then