diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 409bc079..87752010 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -127,7 +127,7 @@ CHECKTEMP(){ until [ ${c} = ${spc1} ]; do spct="${spct} "; c=`expr ${c} + 1`; done reading="${lclr}${lmd}${spct}${temp_f_disp}${GAUGESH}" - if [ "${avgdays}" = "noavg" ] && [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ]; then + if [ "${average}" = "" ] && && [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ]; then if [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then reading="${reading} ${idsCL[LightRed]}\u2B06 " elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)") -eq 1 ]; then @@ -302,7 +302,7 @@ CHECKTEMP(){ reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}" echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}" - if [ "${avgdays}" = "noavg" ] && [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old ]; then + 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 " elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)") -eq 1 ]; then