From a5fa0c2f86c64b271ddbeae7758bc27d2920dcf9 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Thu, 15 Dec 2016 12:49:59 +0800
Subject: [PATCH] 推送传感器数据到大屏
---
method.js | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/method.js b/method.js
index af6b0f2..4a95bb5 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') {
@@ -166,6 +167,22 @@
var ddv = this.toDec(fields[62]) * 256 + this.toDec(fields[63]);
var mcu = this.toDec(fields[64]) + this.toDec(fields[65]) / 100;
+ 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 //������
+ }
+ });
+
var current = moment();
var rank = 0;
--
Gitblit v1.8.0