Update temp.inc.sh
This commit is contained in:
@@ -287,8 +287,8 @@ CHECKTEMP(){
|
||||
lico=" "
|
||||
OLD_temp_h=($(${mysql_conn} -e "SELECT hum,date FROM servermonitor.sensor_data WHERE sensorid='${PW_SENSOR_ID[${SENSOR}]}' AND date >= DATE_SUB(NOW(), INTERVAL ${M} MINUTE) AND date <= DATE_SUB(NOW(), INTERVAL $(expr ${M} - 7) MINUTE) ORDER BY date ASC LIMIT 1"))
|
||||
OLD_temp_h=${OLD_temp_h[2]}
|
||||
OLD_date=${OLD_temp_f[3]}
|
||||
OLD_time=${OLD_temp_f[4]}
|
||||
OLD_date=${OLD_temp_h[3]}
|
||||
OLD_time=${OLD_temp_h[4]}
|
||||
if [ "${OLD_temp_h}" != "" ]; then
|
||||
if [ $(bc -l <<< "${temp_h} < $(echo "scale=2; ${OLD_temp_h}+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "$(echo "scale=2; ${OLD_temp_h}-${PW_TEMPIND_DIFF}" | bc) < ${temp_h}") -eq 1 ]; then
|
||||
lclr="${idsCL[White]}"
|
||||
|
||||
Reference in New Issue
Block a user