Update temp.inc.sh

This commit is contained in:
2024-04-21 15:20:50 -05:00
parent 6c129ea6c6
commit f4ab1972d9

View File

@@ -133,12 +133,12 @@ CHECKTEMP(){
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)") -eq 1 ]; then
reading="${reading}${idsCL[LightGreen]}\u2B07 "
elif [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)" ]; then
reading="${reading}${idsCL[LightCyan]}${idsST[Bold]}\u003D${idsST[Reset]} "
reading="${reading} ${idsCL[LightCyan]}${idsST[Bold]}\u003D${idsST[Reset]}"
else
reading="${reading} "
reading="${reading} "
fi
elif [ "${avgdays}" = "noavg" ]; then
reading="${reading} "
reading="${reading} "
fi
else
@@ -179,7 +179,7 @@ CHECKTEMP(){
fws=10
tmp="${spca}${average_disp}${GAUGESH}"
else
fws=18
fws=19
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
@@ -304,16 +304,16 @@ CHECKTEMP(){
if [ "${average}" = "" ] && [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old ]; then
if [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
echo -en " ${idsCL[LightRed]}\u2B06 "
echo -en "${idsCL[LightRed]}\u2B06 "
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)") -eq 1 ]; then
echo -en " ${idsCL[LightGreen]}\u2B07 "
echo -en "${idsCL[LightGreen]}\u2B07 "
elif [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)" ]; then
echo -en " ${idsCL[LightCyan]}${idsST[Bold]}\u003D${idsST[Reset]} "
echo -en "${idsCL[LightCyan]}${idsST[Bold]}\u003D${idsST[Reset]} "
else
echo -en " "
echo -en " "
fi
elif [ "${avgdays}" = "noavg" ]; then
echo -en " "
echo -en " "
fi
if [ "${avgdays}" != "noavg" ]; then
@@ -334,7 +334,7 @@ CHECKTEMP(){
fi
if [ "${average}" != "" ] || [ "${temp_f}" != "" ]; then
[ "${average}" != "" ] && fws=11 || fws=18
[ "${average}" != "" ] && fws=11 || fws=19
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
if [ "${TTYPE}" == "fans" ]; then