From 0e4e2d26122c5f88f4daa4513785229521f30e18 Mon Sep 17 00:00:00 2001 From: 沈斌 <bluelazysb@hotmail.com> Date: Thu, 15 Dec 2016 13:10:16 +0800 Subject: [PATCH] 添加数据接收时间 --- method.js | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/method.js b/method.js index af6b0f2..4788af8 100644 --- a/method.js +++ b/method.js @@ -4,6 +4,7 @@ var moment = require('moment'); var config = require('./config'); +var queue = require('./queue'); module.exports.toDec = function(hex) { if(typeof hex === 'number') { @@ -168,6 +169,23 @@ var current = moment(); + queue.pushToScreen({ + mac: mac, + location: { + lat: 31.430616, + lng: 120.988327 + }, + data: { + x1: x1, //PM2.5 + x2: x9, //������ + x3: x11, //������ + x4: x10, //������ + x5: x14, //������������ + x6: x12 //������ + }, + time: current.valueOf() + }); + var rank = 0; if(s > 0) { rank = this.random(1000, 99999);//this.random(1000, 99999999); -- Gitblit v1.8.0