From 8b4dfd3185b8a5fda2df7d0df5767a8988c9246d Mon Sep 17 00:00:00 2001 From: fish <gcslyp@gmail.com> Date: Sat, 23 Mar 2019 10:38:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=88=91=E5=85=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/gateway.conf | 2 +- worker.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/conf/gateway.conf b/conf/gateway.conf index 4039a53..272e728 100644 --- a/conf/gateway.conf +++ b/conf/gateway.conf @@ -97,7 +97,7 @@ "type":0, "version":"yunhorn_ys_l_v1", "flip":true, - "id":"15FC0975-BE31-42C4-9194-B5F552CC7255" + "id":"BDA9D650-5E4C-41A0-A78F-DA8A8D488E45" }, { "adrh":0, diff --git a/worker.go b/worker.go index d4a3021..94dd47e 100644 --- a/worker.go +++ b/worker.go @@ -39,6 +39,12 @@ func yunhorn_wireless(data_buf []byte){ if dataType !=3 { for _,item := range conf.WIRELESSSLAVEDEVICES{ //数据是否需要反转,检测到有信号是1的情况 + + // log.Println("adrh:%d,adrl:%d,conf.adrh:%d,conf.adrl:%d",int(adrh),int(adrl),item.ADRH,item.ADRL) + if int(adrh)!=item.ADRH || int(adrl) != item.ADRL{ + continue; + } + if item.FLIP{ if data==0{ data = 1