From 7a951ecdc084ea8643e29e1ade59c1877fd7fbe5 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 16 三月 2020 09:49:07 +0800
Subject: [PATCH] 2020-03-16 1.增加地热模块自动根据当前模式设置当前模式的温度接口.

---
 hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLCommand.java |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 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 5062b57..129a88e 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
@@ -402,6 +402,44 @@
     }
 
     /**
+     * 鎺у埗鍦扮儹妯″潡娓╁害
+     *
+     * @param info
+     * @param state 2020-03-15
+     */
+    public static void geothermalCtrlTemp(final AppliancesInfo info, int state) {
+//        HDLDeviceManager.isGeothermalCtrlSuccess = false;
+        HDLDeviceManager.setDeviceCtrlSuccessStateWithInfo(info, false);
+        if (geothermalCtrlFailTimer != null) {
+            geothermalCtrlFailTimer.cancel();
+            geothermalCtrlFailTimer = null;
+        }
+        if (info.getBigType() == Configuration.GEOTHERMAL_BIG_TYPE) {
+            byte[] sendbytes = GeothermalParser.getGeothermalAddByteTemp(info, state);
+            addSendData(info, sendbytes, Configuration.CONTROL);
+
+            geothermalCtrlFailTimer = new Timer();
+            geothermalCtrlFailTimer.schedule(new TimerTask() {
+                @Override
+                public void run() {
+                    if (!HDLDeviceManager.getDeviceCtrlSuccessStateWithInfo(info)) {
+                        GeothermalBackInfo mGeothermalBackInfo = new GeothermalBackInfo();
+                        mGeothermalBackInfo.setAppliancesInfo(info);
+                        EventBus.getDefault().post(new GeothermalFeedBackEvent(mGeothermalBackInfo, EventCode.FAILURE));
+                    }
+                }
+            }, 5000);
+
+
+        } else {
+            HDLLog.info("鍦扮儹妯″潡鎺у埗涓嶅湪鑼冨洿鍐�"
+                    + " LittleType = " + info.getLittleType()
+                    + " BigType = " + info.getBigType()
+            );
+        }
+    }
+
+    /**
      * 鎺у埗鍦扮儹妯″潡
      *
      * @param info

--
Gitblit v1.8.0