From 522c30f4008275a89290a99659b008240e47ac0a Mon Sep 17 00:00:00 2001 From: fish Date: Sat, 23 Mar 2019 10:25:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84tcp=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/worker.go b/worker.go index 53505c3..d4a3021 100644 --- a/worker.go +++ b/worker.go @@ -29,7 +29,7 @@ func yunhorn_wireless(data_buf []byte){ adrh := data_buf[0] adrl := data_buf[1] - if adrh==0 && adrl==0 { + if (adrh==0 && adrl==0) || (adrh==0 && adrl==1) { go yunhorn_ys_l_v1(data_buf) }else{ dataType := data_buf[2] @@ -131,7 +131,6 @@ func yunhorn_ys_l_v1(data_buf []byte) { demoDevice.DATA["data"+strconv.Itoa(2)] = 0 demoDevice.DATA["data"+strconv.Itoa(3)] = 0 - //485 if data_int0[0]==0 && data_int1[0]==0 { demoDevice.DATA["data"+strconv.Itoa(8)] = data_int[0] var device Device @@ -140,7 +139,7 @@ func yunhorn_ys_l_v1(data_buf []byte) { device.VERSION = demoDevice.VERSION device.ONLINE = demoDevice.ONLINE device.DATA = make(map[string]interface{}) - device.DATA["data7"] = data_int[0] + device.DATA["data8"] = data_int[0] device.Unlock() DEVICEDATAS.DATA[demoDevice.VERSION+"_1"] = device } else {