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 elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)") -eq 1 ]; then
reading="${reading}${idsCL[LightGreen]}\u2B07 " reading="${reading}${idsCL[LightGreen]}\u2B07 "
elif [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)" ]; then 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 else
reading="${reading} " reading="${reading} "
fi fi
elif [ "${avgdays}" = "noavg" ]; then elif [ "${avgdays}" = "noavg" ]; then
reading="${reading} " reading="${reading} "
fi fi
else else
@@ -179,7 +179,7 @@ CHECKTEMP(){
fws=10 fws=10
tmp="${spca}${average_disp}${GAUGESH}" tmp="${spca}${average_disp}${GAUGESH}"
else else
fws=18 fws=19
tmp="${spct}${temp_f_disp}${GAUGESH}" tmp="${spct}${temp_f_disp}${GAUGESH}"
fi fi
c=0; spc=''; spc1=`expr ${fws} - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done 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 [ "${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 <<< "$(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 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 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 else
echo -en " " echo -en " "
fi fi
elif [ "${avgdays}" = "noavg" ]; then elif [ "${avgdays}" = "noavg" ]; then
echo -en " " echo -en " "
fi fi
if [ "${avgdays}" != "noavg" ]; then if [ "${avgdays}" != "noavg" ]; then
@@ -334,7 +334,7 @@ CHECKTEMP(){
fi fi
if [ "${average}" != "" ] || [ "${temp_f}" != "" ]; then if [ "${average}" != "" ] || [ "${temp_f}" != "" ]; then
[ "${average}" != "" ] && fws=11 || fws=18 [ "${average}" != "" ] && fws=11 || fws=19
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' ' [ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' ' [ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
if [ "${TTYPE}" == "fans" ]; then if [ "${TTYPE}" == "fans" ]; then