diff --git a/defaults.inc b/defaults.inc index c1733721..87b9c95a 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.7.3-04212024' +VERS='2.7.5-04222024' noheader=' update service dailytemp confsync -r -report ' @@ -69,6 +69,8 @@ if [ -f ${PW_FOLDER}/settings.local.conf ]; then source ${PW_FOLDER}/settings.local.conf + [ "${PW_TEMPIND_DIFF}" == "" ] && PW_TEMPIND_DIFF=.5 + else echo "NO settings.local.conf FILE FOUND" [ "${1}" ] && [ "${1}" != "update" ] && exit 1 diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index e73fbe91..3c01eaef 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -128,7 +128,7 @@ CHECKTEMP(){ reading="${lclr}${lmd}${spct}${temp_f_disp}${GAUGESH}" if [ "${average}" = "" ] && [[ "${SENSOR}" != *"FAN"* ]] && [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old ]; then - if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)+.5" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)-.5" | bc)") -eq 1 ]; then + if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old | cut -d'~' -f 1)-${PW_TEMPIND_DIFF}" | bc)") -eq 1 ]; then 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]}\u25B2 " @@ -303,7 +303,7 @@ CHECKTEMP(){ echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}" if [ "${average}" = "" ] && [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old ]; then - if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)+.5" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)-.5" | bc)") -eq 1 ]; then + if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)-${PW_TEMPIND_DIFF}" | 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 "