From db21de901bb1bbc6ec66b59e7b0766d0d2c5c6cc Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 16 七月 2019 13:54:44 +0800
Subject: [PATCH] 20190716 1.提供声必可SDK,部分数据处理调整; 2.演示DemoAPP,地热和新风页面调整;

---
 hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLCommand.java |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLCommand.java b/hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLCommand.java
index 0b6f7b8..6324e04 100644
--- a/hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLCommand.java
+++ b/hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLCommand.java
@@ -21,12 +21,14 @@
 import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.AirFeedBackEvent;
 import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.CurtainFeedBackEvent;
 import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.DeviceStateEvent;
+import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.EventCode;
 import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.FreshAirFeedBackEvent;
 import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.GeothermalFeedBackEvent;
 import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.LightFeedBackEvent;
 import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.LogicFeedBackEvent;
 import com.hdl.sdk.hdl_core.Util.LogUtil.HDLLog;
 import com.hdl.sdk.hdl_core.Util.SPUtil.SPUtils;
+import com.hdl.sdk.hdl_core.Util.TransformUtil.HDLUtlis;
 
 import org.greenrobot.eventbus.EventBus;
 
@@ -399,7 +401,7 @@
                     if (!HDLDeviceManager.isGeothermalCtrlSuccess) {
                         GeothermalBackInfo mGeothermalBackInfo = new GeothermalBackInfo();
                         mGeothermalBackInfo.setAppliancesInfo(info);
-                        EventBus.getDefault().post(new GeothermalFeedBackEvent(mGeothermalBackInfo, false));
+                        EventBus.getDefault().post(new GeothermalFeedBackEvent(mGeothermalBackInfo, EventCode.FAILURE));
                     }
                 }
             }, 5000);
@@ -640,7 +642,9 @@
                             && info.getLittleType() == infos.get(j).getLittleType()
                             && info.getChannelNum() == infos.get(j).getChannelNum()
                     ) {
-                        curState = (int) infos.get(j).getCurState();
+//                        curState = (int) infos.get(j).getCurState();//鏃�
+                        //20190712瑙e喅寮哄埗杞崲int绫诲瀷闂��
+                        curState = HDLUtlis.getIntegerByObject(infos.get(j).getCurState());
                         break outter;
                     }
 
@@ -670,7 +674,9 @@
                             && info.getChannelNum() == infos.get(j).getChannelNum()
                     ) {
                         //杩欓噷搴旇鏄淇鐨勶紝鏆傛椂鏈壘鍒般��
-                        switch ((int) infos.get(j).getCurState()) {
+                         //20190712瑙e喅寮哄埗杞崲int绫诲瀷闂��
+                        int  state = HDLUtlis.getIntegerByObject(infos.get(j).getCurState());
+                        switch (state) {
                             case -1:
                                 curState = 0;
                                 break;
@@ -681,7 +687,8 @@
                                 curState = 2;
                                 break;
                             default:
-                                curState = (int) infos.get(j).getCurState();
+//                                curState = (int) infos.get(j).getCurState();
+                                curState = state;
                                 break;
 
                         }

--
Gitblit v1.8.0