Update temp.inc.sh
This commit is contained in:
@@ -300,6 +300,17 @@ CHECKTEMP(){
|
||||
reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}"
|
||||
echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}"
|
||||
|
||||
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 "
|
||||
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)") -eq 1 ]; then
|
||||
reading="${reading} ${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]} "
|
||||
else
|
||||
reading="${reading} "
|
||||
fi
|
||||
fi
|
||||
if [ "${avgdays}" != "noavg" ]; then
|
||||
echo -en " / ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... "
|
||||
average=$(AVERAGETEMP ${SENSOR} ${avgdays} ${sensorname// /_})
|
||||
@@ -318,7 +329,7 @@ CHECKTEMP(){
|
||||
fi
|
||||
|
||||
if [ "${average}" != "" ] || [ "${temp_f}" != "" ]; then
|
||||
[ "${average}" != "" ] && fws=11 || fws=21
|
||||
[ "${average}" != "" ] && fws=8 || fws=18
|
||||
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
|
||||
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
||||
if [ "${TTYPE}" == "fans" ]; then
|
||||
|
||||
Reference in New Issue
Block a user