Update temp.inc.sh

This commit is contained in:
2024-04-21 14:57:24 -05:00
parent 3d4b5d5218
commit 508b1b68e5

View File

@@ -299,20 +299,19 @@ CHECKTEMP(){
c=0; spct=''; spc1=`expr 7 - ${#temp_f}`; until [ ${c} = ${spc1} ]; do spct="${spct} "; c=`expr ${c} + 1`; done
reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}"
echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}"
echo " HERE: $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1) (${temp_f})"
if [ -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
reading="${reading} ${idsCL[LightRed]}\u2B06 "
echo -en "${reading} ${idsCL[LightRed]}\u2B06 "
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)") -eq 1 ]; then
reading="${reading} ${idsCL[LightGreen]}\u2B07 "
echo -en " ${idsCL[LightGreen]}\u2B07 "
elif [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)" ]; then
reading="${reading} ${idsCL[LightCyan]}${idsST[Bold]}~${idsST[Reset]} "
echo -en " ${idsCL[LightCyan]}${idsST[Bold]}~${idsST[Reset]} "
else
reading="${reading} "
echo -en " "
fi
fi
fi
if [ "${avgdays}" != "noavg" ]; then
echo -en " / ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... "
average=$(AVERAGETEMP ${SENSOR} ${avgdays} ${sensorname// /_})