From d0af1f794015cc342bda044c3300ff7fc71448c0 Mon Sep 17 00:00:00 2001 From: nnhy Date: Mon, 16 Nov 2015 10:21:08 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8ReadInput=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E7=8A=B6=E6=80=81=EF=BC=8C=E9=97=A8=E7=AA=97?= =?UTF-8?q?=E7=A3=81=E5=92=8C=E4=B8=89=E4=BD=8D=E8=A7=A6=E6=91=B8=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E6=B5=8B=E8=AF=95=E9=83=BD=E5=8F=AF=E4=BB=A5=E6=94=B6?= =?UTF-8?q?=E5=88=B0Zigbee=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TinyNet/Tiny.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TinyNet/Tiny.cpp b/TinyNet/Tiny.cpp index 883db247..7ad98361 100644 --- a/TinyNet/Tiny.cpp +++ b/TinyNet/Tiny.cpp @@ -72,8 +72,8 @@ ITransport* CreateShunCom(COM_Def index, int baudRate, Pin rst, Pin power, Pin s SerialPort* sp = new SerialPort(index, baudRate); ShunCom* zb = new ShunCom(); - zb->Power.Set(power).Open(); - if(zb->Power) zb->Power.Invert = true; + zb->Power.Set(power); + if(zb->Power.ReadInput()) zb->Power.Invert = true; zb->Sleep.Init(slp, true); zb->Config.Init(cfg, true);