diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 85f8c2fe..ba06ae70 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -128,19 +128,12 @@ CHECKTEMP(){ reading="${lclr}${lmd}${spct}${temp_f_disp}${GAUGESH}" if [ "${average}" = "" ] && [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ]; then - # if [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)" ]; then if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)+2.5" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)-2.5" | bc)") -eq 1 ]; then - # reading="${reading}${idsCL[LightCyan]}\u27F7 " reading="${reading} ${idsCL[LightCyan]}\u23F9 " - elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then - # reading="${reading}${idsCL[LightRed]}\u2B08 " reading="${reading} ${idsCL[LightRed]}\u25B2 " - elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)") -eq 1 ]; then - # reading="${reading}${idsCL[LightGreen]}\u2B0A " reading="${reading} ${idsCL[LightGreen]}\u25BC " - else reading="${reading} " fi @@ -310,12 +303,12 @@ CHECKTEMP(){ echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}" 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 + if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)+2.5" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)-2.5" | bc)") -eq 1 ]; then + echo -en " ${idsCL[LightCyan]}\u23F9 " + elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then echo -en " ${idsCL[LightRed]}\u25B2 " elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)") -eq 1 ]; then echo -en " ${idsCL[LightGreen]}\u25BC " - elif [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)" ]; then - echo -en " ${idsCL[LightCyan]}\u27F7 " else echo -en " " fi