From 64001442be2ba2b9fc5f5981f3a403e1a6d1ed22 Mon Sep 17 00:00:00 2001 From: 沈斌 <bluelazysb@hotmail.com> Date: Thu, 29 Dec 2016 09:42:34 +0800 Subject: [PATCH] 提高PM2.5警告阙值 --- method.js | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/method.js b/method.js index efb3934..9f24d43 100644 --- a/method.js +++ b/method.js @@ -253,16 +253,16 @@ }, function(err, doc) { if (err) return; - if(x1 > 250) { + if(x1 > 500) { var level = 1; - if(x1 > 750) { + if(x1 > 900) { level = 3; - } else if(x1 > 500) { + } else if(x1 > 700) { level = 2; } - sensor_data.id = doc._id; + sensor_data._id = doc.insertedId; sensor_data.level = level; - sensor_data.nitice = _config.notice; + sensor_data.notice = _config.notice; sensor_data.address = _config.address; queue.pushToMQ('ex_data_alarm', sensor_data); } -- Gitblit v1.8.0