JLChen
2019-08-02 425b2352c57a377b1594097a69aabcc87207b683
2019-8-2 14:10:43
1.修改地热演示页面;
10个文件已修改
371 ■■■■ 已修改文件
README.md 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/sdk/hdl_sdk/activity/CtrlActivity.java 219 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/sdk/hdl_sdk/activity/GeothermalActivity.java 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_ctrl.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_main.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/strings.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hdl_core/build.gradle 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLCommand.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLDeviceManager.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLUdpCore.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
README.md
@@ -2,7 +2,7 @@
HDL XW Android SDK  Copyright (c) 2019 HDL Inc.
提供向往SDK项目
提供声必可SDK项目
##Version 1.0.2
1.新增地热模块和新风系统控制和读取状态接口;
app/src/main/java/com/hdl/sdk/hdl_sdk/activity/CtrlActivity.java
@@ -2,6 +2,7 @@
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
@@ -62,7 +63,7 @@
        initView();
        initClickOnEvent();
        HDLCommand.getDeviceState(appliancesInfo);
    }
@@ -628,26 +629,38 @@
        airBtnTemp.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String tempStr = airTempEd.getText().toString();
                if (TextUtils.isEmpty(tempStr) || TextUtils.isEmpty(tempStr)) {
                    showToast("设置的温度不能为空");
                    return;
                }
                int tempInt = Integer.parseInt(tempStr);
                if (tempInt < 16 || tempInt > 30) {
                    showToast("温度设置范围为:16~30摄氏度(℃)");
                    return;
                }
                switch (airModeState) {
                    case 0:
                        //当前空调模式为制冷
                        HDLCommand.airCtrl(appliancesInfo, AirCtrlParser.refTem, Integer.parseInt(airTempEd.getText().toString()));//制冷温度
                        HDLCommand.airCtrl(appliancesInfo, AirCtrlParser.refTem, tempInt);//制冷温度
                        break;
                    case 1:
                        //当前空调模式为制热
                        HDLCommand.airCtrl(appliancesInfo, AirCtrlParser.heatTem, Integer.parseInt(airTempEd.getText().toString()));//制热温度
                        HDLCommand.airCtrl(appliancesInfo, AirCtrlParser.heatTem, tempInt);//制热温度
                        break;
                    case 2:
                        //当前空调模式为通风
                        ToastUtil("通风模式不能控制温度");
                        showToast("通风模式不能控制温度");
                        break;
                    case 3:
                        //当前空调模式为自动
                        HDLCommand.airCtrl(appliancesInfo, AirCtrlParser.autoTem, Integer.parseInt(airTempEd.getText().toString()));//自动温度 范围0-84
                        HDLCommand.airCtrl(appliancesInfo, AirCtrlParser.autoTem, tempInt);//自动温度
                        break;
                    case 4:
                        //当前空调模式为抽湿
                        HDLCommand.airCtrl(appliancesInfo, AirCtrlParser.dehumTem, Integer.parseInt(airTempEd.getText().toString()));//抽湿温度 范围0-84
                        HDLCommand.airCtrl(appliancesInfo, AirCtrlParser.dehumTem, tempInt);//抽湿温度
                        break;
                    default:
                        break;
@@ -691,7 +704,7 @@
                ) {
            //        先判断是否超时
            if (!event.isSuccess()) {
                ToastUtil("灯光控制超时,请重新再试");
                showToast("灯光控制超时,请重新再试");
                lightBtn.setText("灯光控制超时,请重新再试");
                return;
            }
@@ -704,7 +717,7 @@
            String remarks = event.getLightCtrlBackInfo().getRemarks();//获取返回的灯光备注。如果每个灯光回路备注都唯一,可以直接通过备注判断
            String parentRemarks = event.getLightCtrlBackInfo().getParentRemarks();//获取继电器或调光灯备注。这里可以知道是哪个设备返回的
            int num = event.getLightCtrlBackInfo().getChannelNum();//获取回路号。这里可以获取到这个继电器或调光灯的回路号
            ToastUtil(parentRemarks + " 的 " + remarks + " 回路号:" + num + " 返回" + " 亮度为:" + brightness);
            showToast(parentRemarks + " 的 " + remarks + " 回路号:" + num + " 返回" + " 亮度为:" + brightness);
        }
    }
@@ -718,7 +731,7 @@
                ) {
            if (!event.isSuccess()) {
                ToastUtil("窗帘控制超时,请重新再试");
                showToast("窗帘控制超时,请重新再试");
                return;
            }
@@ -730,7 +743,7 @@
            String remarks = event.getCurtainCtrlBackInfo().getRemarks();
            String parentRemarks = event.getCurtainCtrlBackInfo().getParentRemarks();
            int num = event.getCurtainCtrlBackInfo().getNum();
//            ToastUtil(parentRemarks+" 的 "+remarks+" 回路号:"+num+" 返回"+" 状态为:"+curState);
//            showToast(parentRemarks+" 的 "+remarks+" 回路号:"+num+" 返回"+" 状态为:"+curState);
            Log.i("djl", parentRemarks + " 的 " + remarks + " 回路号:" + num + " 返回" + " 状态为:" + curState);
            if (event.getCurtainCtrlBackInfo().getAppliancesInfo().getDeviceType() == HDLApConfig.TYPE_CURTAIN_MODULE) {
                //判断是否为窗帘模块
@@ -769,7 +782,7 @@
                ) {
            //        先判断是否超时
            if (!event.isSuccess()) {
                ToastUtil("空调控制超时,请重新再试");
                showToast("空调控制超时,请重新再试");
                return;
            }
@@ -780,13 +793,13 @@
                        case AirCtrlParser.airOff:
                            airSwitchState = 0;
                            airText.setText("空调关");
                            ToastUtil("空调关");
                            showToast("空调关");
                            Log.i("djl", "空调关");
                            break;
                        case AirCtrlParser.airOn:
                            airSwitchState = 1;
                            airText.setText("空调开");
                            ToastUtil("空调开");
                            showToast("空调开");
                            Log.i("djl", "空调开");
                            break;
                        default:
@@ -800,25 +813,25 @@
                        case AirCtrlParser.airSpeedAuto:
                            airSpeedState = 0;
                            airText.setText("空调风速,风速模式为:airSpeedAuto自动风速");
                            ToastUtil("空调风速,风速模式为:airSpeedAuto自动风速");
                            showToast("空调风速,风速模式为:airSpeedAuto自动风速");
                            Log.i("djl", "空调风速,风速模式为:airSpeedAuto自动风速");
                            break;
                        case AirCtrlParser.airSpeedHigh:
                            airSpeedState = 1;
                            airText.setText("空调风速,风速模式为:airSpeedHigh风速高");
                            ToastUtil("空调风速,风速模式为:airSpeedHigh风速高");
                            showToast("空调风速,风速模式为:airSpeedHigh风速高");
                            Log.i("djl", "空调风速,风速模式为:airSpeedHigh风速高");
                            break;
                        case AirCtrlParser.airSpeedMid:
                            airSpeedState = 2;
                            airText.setText("空调风速,风速模式为:airSpeedMid风速中");
                            ToastUtil("空调风速,风速模式为:airSpeedMid风速中");
                            showToast("空调风速,风速模式为:airSpeedMid风速中");
                            Log.i("djl", "空调风速,风速模式为:airSpeedMid风速中");
                            break;
                        case AirCtrlParser.airSpeedLow:
                            airSpeedState = 3;
                            airText.setText("空调风速,风速模式为:airSpeedLow风速低");
                            ToastUtil("空调风速,风速模式为:airSpeedLow风速低");
                            showToast("空调风速,风速模式为:airSpeedLow风速低");
                            Log.i("djl", "空调风速,风速模式为:airSpeedLow风速低");
                            break;
                        default:
@@ -830,31 +843,31 @@
                        case AirCtrlParser.airModeRefTem:
                            airModeState = 0;
                            airText.setText("空调模式,模式为:制冷");
                            ToastUtil("空调模式,模式为:制冷");
                            showToast("空调模式,模式为:制冷");
                            Log.i("djl", "空调模式,模式为:制冷");
                            break;
                        case AirCtrlParser.airModeHeatTem:
                            airModeState = 1;
                            airText.setText("空调模式,模式为:制热");
                            ToastUtil("空调模式,模式为:制热");
                            showToast("空调模式,模式为:制热");
                            Log.i("djl", "空调模式,模式为:制热");
                            break;
                        case AirCtrlParser.airModeVen:
                            airModeState = 2;
                            airText.setText("空调模式,模式为:通风");
                            ToastUtil("空调模式,模式为:通风");
                            showToast("空调模式,模式为:通风");
                            Log.i("djl", "空调模式,模式为:通风");
                            break;
                        case AirCtrlParser.airModeAuto:
                            airModeState = 3;
                            airText.setText("空调模式,模式为:自动");
                            ToastUtil("空调模式,模式为:自动");
                            showToast("空调模式,模式为:自动");
                            Log.i("djl", "空调模式,模式为:自动");
                            break;
                        case AirCtrlParser.airModeDehum:
                            airModeState = 4;
                            airText.setText("空调模式,模式为:抽湿");
                            ToastUtil("空调模式,模式为:抽湿");
                            showToast("空调模式,模式为:抽湿");
                            Log.i("djl", "空调模式,模式为:抽湿");
                            break;
                        default:
@@ -865,37 +878,37 @@
                case AirCtrlParser.refTem:
                    airTempState = curState[1] & 0xFF;
                    airText.setText("空调制冷,温度为:" + (curState[1] & 0xFF));
                    ToastUtil("空调制冷,温度为:" + (curState[1] & 0xFF));
                    showToast("空调制冷,温度为:" + (curState[1] & 0xFF));
                    Log.i("djl", "空调制冷,温度为:" + (curState[1] & 0xFF));
                    break;
                case AirCtrlParser.heatTem:
                    airTempState = curState[1] & 0xFF;
                    airText.setText("空调制热,制热温度为" + (curState[1] & 0xFF));
                    ToastUtil("空调制热,制热温度为" + (curState[1] & 0xFF));
                    showToast("空调制热,制热温度为" + (curState[1] & 0xFF));
                    Log.i("djl", "空调制热,制热温度为" + (curState[1] & 0xFF));
                    break;
                case AirCtrlParser.autoTem:
                    airTempState = -1;
                    airText.setText("空调自动,自动温度为" + (curState[1] & 0xFF));
                    ToastUtil("空调自动,自动温度为" + (curState[1] & 0xFF));
                    showToast("空调自动,自动温度为" + (curState[1] & 0xFF));
                    Log.i("djl", "空调自动,自动温度为" + (curState[1] & 0xFF));
                    break;
                case AirCtrlParser.dehumTem:
                    airTempState = curState[1] & 0xFF;
                    airText.setText("空调抽湿,抽湿温度为" + (curState[1] & 0xFF));
                    ToastUtil("空调抽湿,抽湿温度为" + (curState[1] & 0xFF));
                    showToast("空调抽湿,抽湿温度为" + (curState[1] & 0xFF));
                    Log.i("djl", "空调抽湿,抽湿温度为" + (curState[1] & 0xFF));
                    break;
                case AirCtrlParser.upTem:
                    airTempState = curState[1] & 0xFF;
                    airText.setText("空调调温,上升温度:" + (curState[1] & 0xFF));
                    ToastUtil("空调调温,上升温度:" + (curState[1] & 0xFF));
                    showToast("空调调温,上升温度:" + (curState[1] & 0xFF));
                    Log.i("djl", "空调调温,上升温度:" + (curState[1] & 0xFF));
                    break;
                case AirCtrlParser.downTem:
                    airTempState = curState[1] & 0xFF;
                    airText.setText("空调调温,下降温度:" + (curState[1] & 0xFF));
                    ToastUtil("空调调温,下降温度:" + (curState[1] & 0xFF));
                    showToast("空调调温,下降温度:" + (curState[1] & 0xFF));
                    Log.i("djl", "空调调温,下降温度:" + (curState[1] & 0xFF));
                    break;
@@ -911,10 +924,10 @@
                && event.getLogicCtrlBackInfo().getAppliancesInfo().getChannelNum() == appliancesInfo.getChannelNum()
                ) {
            if (!event.isSuccess()) {
                ToastUtil("场景控制超时,请重新再试");
                showToast("场景控制超时,请重新再试");
                return;
            }
            ToastUtil("场景控制成功");
            showToast("场景控制成功");
        }
    }
@@ -932,7 +945,7 @@
                case HDLApConfig.TYPE_LIGHT_MIX_RELAY:
                    if (appliancesInfo.getChannelNum() == event.getAppliancesInfo().getChannelNum()) {
                        if (!event.isSuccess()) {
                            ToastUtil("获取灯光状态失败,请重新再试");
                            showToast("获取灯光状态失败,请重新再试");
                            return;
                        }
                        lightBtn.setText("亮度 = " + event.getAppliancesInfo().getCurState());
@@ -943,7 +956,7 @@
                case HDLApConfig.TYPE_CURTAIN_MODULE:
                    if (appliancesInfo.getChannelNum() == event.getAppliancesInfo().getChannelNum()) {
                        if (!event.isSuccess()) {
                            ToastUtil("获取窗帘状态失败,请重新再试");
                            showToast("获取窗帘状态失败,请重新再试");
                            return;
                        }
                        //窗帘模块:curState:0=停止,1=打开,2=关闭。
@@ -973,7 +986,7 @@
                case HDLApConfig.TYPE_AC_PANEL:
                    if (appliancesInfo.getChannelNum() == event.getAppliancesInfo().getChannelNum()) {
                        if (!event.isSuccess()) {
                            ToastUtil("获取空调状态失败,请重新再试");
                            showToast("获取空调状态失败,请重新再试");
                            return;
                        }
@@ -984,13 +997,13 @@
                                    case AirCtrlParser.airOff:
                                        airSwitchState = 0;
                                        airText.setText("空调关");
                                        ToastUtil("空调关");
                                        showToast("空调关");
                                        Log.i("djl", "空调关");
                                        break;
                                    case AirCtrlParser.airOn:
                                        airSwitchState = 1;
                                        airText.setText("空调开");
                                        ToastUtil("空调开");
                                        showToast("空调开");
                                        Log.i("djl", "空调开");
                                        break;
                                    default:
@@ -1004,25 +1017,25 @@
                                    case AirCtrlParser.airSpeedAuto:
                                        airSpeedState = 0;
                                        airText.setText("空调风速,风速模式为:airSpeedAuto自动风速");
                                        ToastUtil("空调风速,风速模式为:airSpeedAuto自动风速");
                                        showToast("空调风速,风速模式为:airSpeedAuto自动风速");
                                        Log.i("djl", "空调风速,风速模式为:airSpeedAuto自动风速");
                                        break;
                                    case AirCtrlParser.airSpeedHigh:
                                        airSpeedState = 1;
                                        airText.setText("空调风速,风速模式为:airSpeedHigh风速高");
                                        ToastUtil("空调风速,风速模式为:airSpeedHigh风速高");
                                        showToast("空调风速,风速模式为:airSpeedHigh风速高");
                                        Log.i("djl", "空调风速,风速模式为:airSpeedHigh风速高");
                                        break;
                                    case AirCtrlParser.airSpeedMid:
                                        airSpeedState = 2;
                                        airText.setText("空调风速,风速模式为:airSpeedMid风速中");
                                        ToastUtil("空调风速,风速模式为:airSpeedMid风速中");
                                        showToast("空调风速,风速模式为:airSpeedMid风速中");
                                        Log.i("djl", "空调风速,风速模式为:airSpeedMid风速中");
                                        break;
                                    case AirCtrlParser.airSpeedLow:
                                        airSpeedState = 3;
                                        airText.setText("空调风速,风速模式为:airSpeedLow风速低");
                                        ToastUtil("空调风速,风速模式为:airSpeedLow风速低");
                                        showToast("空调风速,风速模式为:airSpeedLow风速低");
                                        Log.i("djl", "空调风速,风速模式为:airSpeedLow风速低");
                                        break;
                                    default:
@@ -1034,31 +1047,31 @@
                                    case AirCtrlParser.airModeRefTem:
                                        airModeState = 0;
                                        airText.setText("空调模式,模式为:制冷");
                                        ToastUtil("空调模式,模式为:制冷");
                                        showToast("空调模式,模式为:制冷");
                                        Log.i("djl", "空调模式,模式为:制冷");
                                        break;
                                    case AirCtrlParser.airModeHeatTem:
                                        airModeState = 1;
                                        airText.setText("空调模式,模式为:制热");
                                        ToastUtil("空调模式,模式为:制热");
                                        showToast("空调模式,模式为:制热");
                                        Log.i("djl", "空调模式,模式为:制热");
                                        break;
                                    case AirCtrlParser.airModeVen:
                                        airModeState = 2;
                                        airText.setText("空调模式,模式为:通风");
                                        ToastUtil("空调模式,模式为:通风");
                                        showToast("空调模式,模式为:通风");
                                        Log.i("djl", "空调模式,模式为:通风");
                                        break;
                                    case AirCtrlParser.airModeAuto:
                                        airModeState = 3;
                                        airText.setText("空调模式,模式为:自动");
                                        ToastUtil("空调模式,模式为:自动");
                                        showToast("空调模式,模式为:自动");
                                        Log.i("djl", "空调模式,模式为:自动");
                                        break;
                                    case AirCtrlParser.airModeDehum:
                                        airModeState = 4;
                                        airText.setText("空调模式,模式为:抽湿");
                                        ToastUtil("空调模式,模式为:抽湿");
                                        showToast("空调模式,模式为:抽湿");
                                        Log.i("djl", "空调模式,模式为:抽湿");
                                        break;
                                    default:
@@ -1068,37 +1081,37 @@
                            case AirCtrlParser.refTem:
                                airTempState = curState[1] & 0xFF;
                                airText.setText("空调制冷,温度为:" + (curState[1] & 0xFF));
                                ToastUtil("空调制冷,温度为:" + (curState[1] & 0xFF));
                                showToast("空调制冷,温度为:" + (curState[1] & 0xFF));
                                Log.i("djl", "空调制冷,温度为:" + (curState[1] & 0xFF));
                                break;
                            case AirCtrlParser.heatTem:
                                airTempState = curState[1] & 0xFF;
                                airText.setText("空调制热,制热温度为" + (curState[1] & 0xFF));
                                ToastUtil("空调制热,制热温度为" + (curState[1] & 0xFF));
                                showToast("空调制热,制热温度为" + (curState[1] & 0xFF));
                                Log.i("djl", "空调制热,制热温度为" + (curState[1] & 0xFF));
                                break;
                            case AirCtrlParser.autoTem:
                                airTempState = curState[1] & 0xFF;
                                airText.setText("空调自动,自动温度为" + (curState[1] & 0xFF));
                                ToastUtil("空调自动,自动温度为" + (curState[1] & 0xFF));
                                showToast("空调自动,自动温度为" + (curState[1] & 0xFF));
                                Log.i("djl", "空调自动,自动温度为" + (curState[1] & 0xFF));
                                break;
                            case AirCtrlParser.dehumTem:
                                airTempState = curState[1] & 0xFF;
                                airText.setText("空调抽湿,抽湿温度为" + (curState[1] & 0xFF));
                                ToastUtil("空调抽湿,抽湿温度为" + (curState[1] & 0xFF));
                                showToast("空调抽湿,抽湿温度为" + (curState[1] & 0xFF));
                                Log.i("djl", "空调抽湿,抽湿温度为" + (curState[1] & 0xFF));
                                break;
                            case AirCtrlParser.upTem:
                                airTempState = curState[1] & 0xFF;
                                airText.setText("空调调温,上升温度:" + (curState[1] & 0xFF));
                                ToastUtil("空调调温,上升温度:" + (curState[1] & 0xFF));
                                showToast("空调调温,上升温度:" + (curState[1] & 0xFF));
                                Log.i("djl", "空调调温,上升温度:" + (curState[1] & 0xFF));
                                break;
                            case AirCtrlParser.downTem:
                                airTempState = curState[1] & 0xFF;
                                airText.setText("空调调温,下降温度:" + (curState[1] & 0xFF));
                                ToastUtil("空调调温,下降温度:" + (curState[1] & 0xFF));
                                showToast("空调调温,下降温度:" + (curState[1] & 0xFF));
                                Log.i("djl", "空调调温,下降温度:" + (curState[1] & 0xFF));
                                break;
                        }
@@ -1107,276 +1120,276 @@
                case HDLApConfig.TYPE_SENSOR_DRY_CONTACT:
                    //传感器 干接点 。只有开关状态
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---干接点状态失败,请重新再试");
                        showToast("获取传感器---干接点状态失败,请重新再试");
                        return;
                    }
                    float dryContactValue = (float) event.getAppliancesInfo().getCurState();
                    String dryContactUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---干接点状态:" + dryContactValue + dryContactUnit);
                    showToast("传感器---干接点状态:" + dryContactValue + dryContactUnit);
                    Log.i("djl", "传感器---干接点状态:" + dryContactValue + dryContactUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_MOVEMENT_DETECTOR:
                    //传感器 移动探测 。灵敏度
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---移动探测灵敏度状态失败,请重新再试");
                        showToast("获取传感器---移动探测灵敏度状态失败,请重新再试");
                        return;
                    }
                    float mdValue = (float) event.getAppliancesInfo().getCurState();
                    String mdValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---移动探测灵敏度:" + mdValue + mdValueUnit);
                    showToast("传感器---移动探测灵敏度:" + mdValue + mdValueUnit);
                    Log.i("djl", "传感器---移动探测灵敏度:" + mdValue + mdValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_TEMP:
                    //传感器 温度
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---温度状态失败,请重新再试");
                        showToast("获取传感器---温度状态失败,请重新再试");
                        return;
                    }
                    float tempValue = (float) event.getAppliancesInfo().getCurState();
                    String tempValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---温度:" + tempValue + tempValueUnit);
                    showToast("传感器---温度:" + tempValue + tempValueUnit);
                    Log.i("djl", "传感器---温度:" + tempValue + tempValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_HUMIDITY:
                    //传感器 湿度
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---湿度状态失败,请重新再试");
                        showToast("获取传感器---湿度状态失败,请重新再试");
                        return;
                    }
                    float humidityValue = (float) event.getAppliancesInfo().getCurState();
                    String humidityValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---湿度:" + humidityValue + humidityValueUnit);
                    showToast("传感器---湿度:" + humidityValue + humidityValueUnit);
                    Log.i("djl", "传感器---湿度:" + humidityValue + humidityValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_ILLUMINACE:
                    //传感器 照度
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---照度状态失败,请重新再试");
                        showToast("获取传感器---照度状态失败,请重新再试");
                        return;
                    }
                    float illuminaceValue = (float) event.getAppliancesInfo().getCurState();
                    String illuminaceValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---照度:" + illuminaceValue + illuminaceValueUnit);
                    showToast("传感器---照度:" + illuminaceValue + illuminaceValueUnit);
                    Log.i("djl", "传感器---照度:" + illuminaceValue + illuminaceValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_VOC:
                    //传感器 当前空气质量等级
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---当前空气质量等级状态失败,请重新再试");
                        showToast("获取传感器---当前空气质量等级状态失败,请重新再试");
                        return;
                    }
                    float vocValue = (float) event.getAppliancesInfo().getCurState();
                    String vocValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---当前空气质量等级:" + vocValue + vocValueUnit);
                    showToast("传感器---当前空气质量等级:" + vocValue + vocValueUnit);
                    Log.i("djl", "传感器---当前空气质量等级:" + vocValue + vocValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_PM_2_POINT_5:
                    //传感器 pm2.5
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---pm2.5状态失败,请重新再试");
                        showToast("获取传感器---pm2.5状态失败,请重新再试");
                        return;
                    }
                    float pm2_5Value = (float) event.getAppliancesInfo().getCurState();
                    String pm2_5ValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---pm2.5:" + pm2_5Value + pm2_5ValueUnit);
                    showToast("传感器---pm2.5:" + pm2_5Value + pm2_5ValueUnit);
                    Log.i("djl", "传感器---pm2.5:" + pm2_5Value + pm2_5ValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_C02:
                    //传感器 二氧化碳
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---二氧化碳状态失败,请重新再试");
                        showToast("获取传感器---二氧化碳状态失败,请重新再试");
                        return;
                    }
                    float co2Value = (float) event.getAppliancesInfo().getCurState();
                    String co2ValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---二氧化碳:" + co2Value + co2ValueUnit);
                    showToast("传感器---二氧化碳:" + co2Value + co2ValueUnit);
                    Log.i("djl", "传感器---二氧化碳:" + co2Value + co2ValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_LPG:
                    //传感器 液化石油气
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---液化石油气状态失败,请重新再试");
                        showToast("获取传感器---液化石油气状态失败,请重新再试");
                        return;
                    }
                    float lpgValue = (float) event.getAppliancesInfo().getCurState();
                    String lpgValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---液化石油气:" + lpgValue + lpgValueUnit);
                    showToast("传感器---液化石油气:" + lpgValue + lpgValueUnit);
                    Log.i("djl", "传感器---液化石油气:" + lpgValue + lpgValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_CO_H2:
                    //传感器 人工煤气
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---人工煤气状态失败,请重新再试");
                        showToast("获取传感器---人工煤气状态失败,请重新再试");
                        return;
                    }
                    float coh2Value = (float) event.getAppliancesInfo().getCurState();
                    String coh2ValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---人工煤气:" + coh2Value + coh2ValueUnit);
                    showToast("传感器---人工煤气:" + coh2Value + coh2ValueUnit);
                    Log.i("djl", "传感器---人工煤气:" + coh2Value + coh2ValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_CH4:
                    //传感器 天然气
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---天然气状态失败,请重新再试");
                        showToast("获取传感器---天然气状态失败,请重新再试");
                        return;
                    }
                    float ch4Value = (float) event.getAppliancesInfo().getCurState();
                    String ch4ValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---天然气:" + ch4Value + ch4ValueUnit);
                    showToast("传感器---天然气:" + ch4Value + ch4ValueUnit);
                    Log.i("djl", "传感器---天然气:" + ch4Value + ch4ValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_SMOG:
                    //传感器 烟雾
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---烟雾状态失败,请重新再试");
                        showToast("获取传感器---烟雾状态失败,请重新再试");
                        return;
                    }
                    float smogValue = (float) event.getAppliancesInfo().getCurState();
                    String smogValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---烟雾:" + smogValue + smogValueUnit);
                    showToast("传感器---烟雾:" + smogValue + smogValueUnit);
                    Log.i("djl", "传感器---烟雾:" + smogValue + smogValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_WIND_SPEED:
                    //传感器 风速
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---风速状态失败,请重新再试");
                        showToast("获取传感器---风速状态失败,请重新再试");
                        return;
                    }
                    float windSpeedValue = (float) event.getAppliancesInfo().getCurState();
                    String windSpeedValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---风速:" + windSpeedValue + windSpeedValueUnit);
                    showToast("传感器---风速:" + windSpeedValue + windSpeedValueUnit);
                    Log.i("djl", "传感器---风速:" + windSpeedValue + windSpeedValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_WIND_PRESSURE:
                    //传感器 风压
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---风压状态失败,请重新再试");
                        showToast("获取传感器---风压状态失败,请重新再试");
                        return;
                    }
                    float windPressureValue = (float) event.getAppliancesInfo().getCurState();
                    String windPressureValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---风压:" + windPressureValue + windPressureValueUnit);
                    showToast("传感器---风压:" + windPressureValue + windPressureValueUnit);
                    Log.i("djl", "传感器---风压:" + windPressureValue + windPressureValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_LIQUID_FLOW:
                    //传感器 液体流量
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---液体流量状态失败,请重新再试");
                        showToast("获取传感器---液体流量状态失败,请重新再试");
                        return;
                    }
                    float liquidFlowValue = (float) event.getAppliancesInfo().getCurState();
                    String liquidFlowValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---液体流量:" + liquidFlowValue + liquidFlowValueUnit);
                    showToast("传感器---液体流量:" + liquidFlowValue + liquidFlowValueUnit);
                    Log.i("djl", "传感器---液体流量:" + liquidFlowValue + liquidFlowValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_LIQUID_PRESSURE:
                    //传感器 液体压力
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---液体压力状态失败,请重新再试");
                        showToast("获取传感器---液体压力状态失败,请重新再试");
                        return;
                    }
                    float liquidPressureValue = (float) event.getAppliancesInfo().getCurState();
                    String liquidPressureValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---液体压力:" + liquidPressureValue + liquidPressureValueUnit);
                    showToast("传感器---液体压力:" + liquidPressureValue + liquidPressureValueUnit);
                    Log.i("djl", "传感器---液体压力:" + liquidPressureValue + liquidPressureValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_LIQUID_DEPTH:
                    //传感器 液体深度
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---液体深度状态失败,请重新再试");
                        showToast("获取传感器---液体深度状态失败,请重新再试");
                        return;
                    }
                    float liquidDepthValue = (float) event.getAppliancesInfo().getCurState();
                    String liquidDepthValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---液体深度:" + liquidDepthValue + liquidDepthValueUnit);
                    showToast("传感器---液体深度:" + liquidDepthValue + liquidDepthValueUnit);
                    Log.i("djl", "传感器---液体深度:" + liquidDepthValue + liquidDepthValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_RAIN_FALL:
                    //传感器 雨量
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---雨量状态失败,请重新再试");
                        showToast("获取传感器---雨量状态失败,请重新再试");
                        return;
                    }
                    float rainFallValue = (float) event.getAppliancesInfo().getCurState();
                    String rainFallValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---雨量:" + rainFallValue + rainFallValueUnit);
                    showToast("传感器---雨量:" + rainFallValue + rainFallValueUnit);
                    Log.i("djl", "传感器---雨量:" + rainFallValue + rainFallValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_WEIGHT:
                    //传感器 重量
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---重量状态失败,请重新再试");
                        showToast("获取传感器---重量状态失败,请重新再试");
                        return;
                    }
                    float weightValue = (float) event.getAppliancesInfo().getCurState();
                    String weightValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---重量:" + weightValue + weightValueUnit);
                    showToast("传感器---重量:" + weightValue + weightValueUnit);
                    Log.i("djl", "传感器---重量:" + weightValue + weightValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_HEIGHT_LENGTH:
                    //传感器 重量
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---重量状态失败,请重新再试");
                        showToast("获取传感器---重量状态失败,请重新再试");
                        return;
                    }
                    float height_lengthValue = (float) event.getAppliancesInfo().getCurState();
                    String height_lengthValueUnit = ((SensorStateBackInfo) event).getUnite();
                    ToastUtil("传感器---重量:" + height_lengthValue + height_lengthValueUnit);
                    showToast("传感器---重量:" + height_lengthValue + height_lengthValueUnit);
                    Log.i("djl", "传感器---重量:" + height_lengthValue + height_lengthValueUnit);
                    break;
                case HDLApConfig.TYPE_SENSOR_OBJECT_SPEED:
                    //传感器 物体速度
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---物体速度状态失败,请重新再试");
                        showToast("获取传感器---物体速度状态失败,请重新再试");
                        return;
                    }
                    float objectSpeedValue = (float) event.getAppliancesInfo().getCurState();
                    String objectSpeedUnite = ((SensorStateBackInfo) event).getUnite();//数值单位
                    ToastUtil("传感器---物体速度:" + objectSpeedValue + objectSpeedUnite);
                    showToast("传感器---物体速度:" + objectSpeedValue + objectSpeedUnite);
                    Log.i("djl", "传感器---物体速度:" + objectSpeedValue + objectSpeedUnite);
                    break;
                case HDLApConfig.TYPE_SENSOR_SHAKE:
                    //传感器 震动
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---震动状态失败,请重新再试");
                        showToast("获取传感器---震动状态失败,请重新再试");
                        return;
                    }
                    float shakeValue = (float) event.getAppliancesInfo().getCurState();
                    String shakeValueUnite = ((SensorStateBackInfo) event).getUnite();//数值单位
                    ToastUtil("传感器---震动:" + shakeValue + shakeValueUnite);
                    showToast("传感器---震动:" + shakeValue + shakeValueUnite);
                    Log.i("djl", "传感器---震动:" + shakeValue + shakeValueUnite);
                    break;
                case HDLApConfig.TYPE_SENSOR_VOLTAGE:
                    //传感器 电压
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---电压状态失败,请重新再试");
                        showToast("获取传感器---电压状态失败,请重新再试");
                        return;
                    }
                    float voltageValue = (float) event.getAppliancesInfo().getCurState();
                    String voltageValueUnite = ((SensorStateBackInfo) event).getUnite();//数值单位
                    ToastUtil("传感器---电压:" + voltageValue + voltageValueUnite);
                    showToast("传感器---电压:" + voltageValue + voltageValueUnite);
                    Log.i("djl", "传感器---电压:" + voltageValue + voltageValueUnite);
                    break;
                case HDLApConfig.TYPE_SENSOR_ELECTRICITY:
                    //传感器 电流
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---电流状态失败,请重新再试");
                        showToast("获取传感器---电流状态失败,请重新再试");
                        return;
                    }
                    float electricityValue = (float) event.getAppliancesInfo().getCurState();
                    String electricityValueUnite = ((SensorStateBackInfo) event).getUnite();//数值单位
                    ToastUtil("传感器---电流:" + electricityValue + electricityValueUnite);
                    showToast("传感器---电流:" + electricityValue + electricityValueUnite);
                    Log.i("djl", "传感器---电流:" + electricityValue + electricityValueUnite);
                    break;
                case HDLApConfig.TYPE_SENSOR_POWER:
                    //传感器 功率
                    if (appliancesInfo.getChannelNum() != event.getAppliancesInfo().getChannelNum() || !event.isSuccess()) {
                        ToastUtil("获取传感器---功率状态失败,请重新再试");
                        showToast("获取传感器---功率状态失败,请重新再试");
                        return;
                    }
                    float powerValue = (float) event.getAppliancesInfo().getCurState();
                    String powerValueUnite = ((SensorStateBackInfo) event).getUnite();//数值单位
                    ToastUtil("传感器---功率:" + powerValue + powerValueUnite);
                    showToast("传感器---功率:" + powerValue + powerValueUnite);
                    Log.i("djl", "传感器---功率:" + powerValue + powerValueUnite);
                    break;
@@ -1386,8 +1399,8 @@
    }
    public void ToastUtil(String text) {
        Toast.makeText(CtrlActivity.this, text, Toast.LENGTH_SHORT).show();
    }
    public void showToast(String text) {
        Toast.makeText(this, text, Toast.LENGTH_SHORT).show();
    }
}
app/src/main/java/com/hdl/sdk/hdl_sdk/activity/GeothermalActivity.java
@@ -309,41 +309,43 @@
                showToast("地热模块,返回数据为空");
                return;
            }
            String message = "";
            GeothermalBackInfo mGeothermalBackInfo = event.getGeothermalBackInfo();
            showGeothermalBackInfo(mGeothermalBackInfo);
            switch (ctrlId) {   //ctrlId 当前控制类型,只反馈控制的状态
                case GeothermalParser.gSwich:
                    message = getSwichStateString(mGeothermalBackInfo.getIsOn());
                    break;
                case GeothermalParser.gMode:
                    message = getModeStateString(mGeothermalBackInfo.getgMode());
                    break;
                case GeothermalParser.gNormalTemp:
//                    gTempState = mGeothermalBackInfo.getgNormalTemp();
                    message = "普通模式温度:" + mGeothermalBackInfo.getgNormalTemp();
                    break;
//            String message = "";
//            GeothermalBackInfo mGeothermalBackInfo = event.getGeothermalBackInfo();
                case GeothermalParser.gDayTemp:
                    message = "白天模式温度:" + mGeothermalBackInfo.getgDayTemp();
                    break;
                case GeothermalParser.gNightTemp:
                    message = "夜间模式温度:" + mGeothermalBackInfo.getgNightTemp();
                    break;
                case GeothermalParser.gLeaveTemp:
                    message = "离开模式温度:" + mGeothermalBackInfo.getgLeaveTemp();
                    break;
                default:
                    break;
            }
            mTextView.setText(message);
            showToast(message);
            HDLLog.I(message);
//            switch (ctrlId) {   //ctrlId 当前控制类型,只反馈控制的状态
//                case GeothermalParser.gSwich:
//                    message = getSwichStateString(mGeothermalBackInfo.getIsOn());
//                    break;
//                case GeothermalParser.gMode:
//                    message = getModeStateString(mGeothermalBackInfo.getgMode());
//                    break;
//                case GeothermalParser.gNormalTemp:
////                    gTempState = mGeothermalBackInfo.getgNormalTemp();
//                    message = "普通模式温度:" + mGeothermalBackInfo.getgNormalTemp();
//                    break;
//
//
//                case GeothermalParser.gDayTemp:
//                    message = "白天模式温度:" + mGeothermalBackInfo.getgDayTemp();
//                    break;
//                case GeothermalParser.gNightTemp:
//                    message = "夜间模式温度:" + mGeothermalBackInfo.getgNightTemp();
//                    break;
//                case GeothermalParser.gLeaveTemp:
//                    message = "离开模式温度:" + mGeothermalBackInfo.getgLeaveTemp();
//                    break;
//                default:
//                    break;
//
//            }
//
//
//            mTextView.setText(message);
//            showToast(message);
//            HDLLog.I(message);
        }
    }
@@ -369,6 +371,20 @@
                            return;
                        }
                        showGeothermalBackInfo(mGeothermalBackInfo);
                    }
                    break;
            }
        }
    }
    /**
     * showGeothermalBackInfo
     * @param mGeothermalBackInfo
     */
    private void showGeothermalBackInfo(GeothermalBackInfo mGeothermalBackInfo){
        String message = "";
                        if(mGeothermalBackInfo.getIsOn() == GeothermalParser.gSwichOn) {
                            message = getSwichStateString(mGeothermalBackInfo.getIsOn());
@@ -385,10 +401,5 @@
                        mTextView.setText(message);
                        showToast(message);
                        HDLLog.I(message);
                    }
                    break;
            }
        }
    }
}
app/src/main/res/layout/activity_ctrl.xml
@@ -118,7 +118,9 @@
                <EditText
                    android:id="@+id/airet_tempet"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" />
                    android:layout_height="match_parent"
                    android:inputType="number"
                    />
            </LinearLayout>
app/src/main/res/layout/activity_main.xml
@@ -14,7 +14,7 @@
            android:id="@+id/version"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="hdl_lib_v1.5.9.20190710_beta"
            android:text="@string/app_version"
            />
        <LinearLayout
            android:layout_width="wrap_content"
@@ -31,7 +31,9 @@
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            android:orientation="vertical"
            android:focusable="true"
            android:focusableInTouchMode="true">
            <EditText
                android:id="@+id/edt"
app/src/main/res/values/strings.xml
@@ -1,3 +1,4 @@
<resources>
    <string name="app_name">HDL_SDK</string>
    <string name="app_version">hdl_lib_v1.0.2.2.20190723_beta</string>
</resources>
hdl_core/build.gradle
@@ -6,7 +6,7 @@
    defaultConfig {
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionCode 2
        versionName "1.0.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLCommand.java
@@ -581,8 +581,6 @@
     */
    public static List<DeviceStateBean> getAllDevicesState() {
        List<DeviceStateBean> deviceStateBeanList = new ArrayList<>();
        for (int i = 0; i < HDLDeviceManager.devicesDataList.size(); i++) {
            List<AppliancesInfo> appliancesInfos = HDLDeviceManager.devicesDataList.get(i).getAppliancesInfoList();
            for (int j = 0; j < appliancesInfos.size(); j++) {
@@ -966,7 +964,7 @@
                }
            }
        }, 1, 200);
        }, 1, 500); //2019-07-23 发一次补发3次,间隔500ms
    }
hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLDeviceManager.java
@@ -90,7 +90,6 @@
    public static boolean isGeothermalCtrlSuccess = false; //判断地热模块是否控制成功
    /**
     * 初始化SDK
     *
@@ -1009,7 +1008,9 @@
                    ) {
                        List<AppliancesInfo> infos = devicesDataList.get(i).getAppliancesInfoList();
                        for (int j = 0, len2 = infos.size(); j < len2; j++) {
                            if (infos.get(j).getChannelNum() == (getDatas.addBytes[0] & 0xFF)) {
                            if (infos.get(j).getBigType() == Configuration.FRESH_AIR_BIG_TYPE
                                    && infos.get(j).getDeviceType() == HDLApConfig.TYPE_FRESH_AIR
                                    && infos.get(j).getChannelNum() == (getDatas.addBytes[0] & 0xFF)) {
                                devicesDataList.get(i).getAppliancesInfoList().get(j).setFeedbackState(getDatas.addBytes);
                                AppliancesInfo mFreshAirInfo = devicesDataList.get(i).getAppliancesInfoList().get(j);
@@ -1030,6 +1031,7 @@
    /**
     * 处理地热设备控制数据
     *  20190710
     *
     * @param getDatas
     */
    private static void handleGeothermalCtrlData(UdpDataBean getDatas) {
@@ -1045,7 +1047,9 @@
                        List<AppliancesInfo> infos = devicesDataList.get(i).getAppliancesInfoList();
                        for (int j = 0, len2 = infos.size(); j < len2; j++) {
                            if(getDatas.addBytes.length > 0) {
                                if (infos.get(j).getChannelNum() == (getDatas.addBytes[0] & 0xFF)) {
                                if (infos.get(j).getBigType() == Configuration.GEOTHERMAL_BIG_TYPE
                                        && infos.get(j).getDeviceType() == HDLApConfig.TYPE_GEOTHERMAL_MODULE
                                        && infos.get(j).getChannelNum() == (getDatas.addBytes[0] & 0xFF)) {
                                    if (getDatas.addBytes.length >= 8) {
                                        byte[] getBytes = devicesDataList.get(i).getAppliancesInfoList().get(j).getFeedbackState();
                                        if (getBytes == null || getBytes.length < 10) {
@@ -2194,7 +2198,7 @@
                            HDLLog.info("handle state 没有找到匹配类型");
                            break;
                    }
//                    break outter;
                }
                break outter;
            }
@@ -2204,6 +2208,7 @@
    /**
     * 处理新风设备状态数据
     * 20190710新增
     *
     * @param getDatas
     */
    private static void handleFreshAirStateData(UdpDataBean getDatas) {
@@ -2214,18 +2219,17 @@
            ) {
                List<AppliancesInfo> infos = devicesDataList.get(i).getAppliancesInfoList();
                for (int j = 0, len2 = infos.size(); j < len2; j++) {
                    switch (devicesDataList.get(i).getAppliancesInfoList().get(j).getDeviceType()) {
                        case HDLApConfig.TYPE_FRESH_AIR:
                    if (infos.get(j).getBigType() == Configuration.FRESH_AIR_BIG_TYPE
                            && infos.get(j).getDeviceType() == HDLApConfig.TYPE_FRESH_AIR
                            && infos.get(j).getChannelNum() == (getDatas.addBytes[0] & 0xFF)) {//2019-07-17
                            isGetDeviceStateSuccess = true;
                            devicesDataList.get(i).getAppliancesInfoList().get(j).setFeedbackState(getDatas.addBytes);
                            EventBus.getDefault().post(new DeviceStateEvent(devicesDataList.get(i).getAppliancesInfoList().get(j), true));
                            break;
                        default:
                        break outter;
                    }else {
                            HDLLog.info("handleFreshAirStateData 没有找到匹配类型");
                            break;
                    }
                }
                break outter;
            }
@@ -2236,6 +2240,7 @@
    /**
     * 处理地热设备状态数据
     * 20190710新增
     *
     * @param getDatas
     */
    private static void handleGeothermalStateData(UdpDataBean getDatas) {
@@ -2246,9 +2251,9 @@
            ) {
                List<AppliancesInfo> infos = devicesDataList.get(i).getAppliancesInfoList();
                for (int j = 0, len2 = infos.size(); j < len2; j++) {
                    switch (devicesDataList.get(i).getAppliancesInfoList().get(j).getDeviceType()) {
                        case HDLApConfig.TYPE_GEOTHERMAL_MODULE:
                    if (infos.get(j).getBigType() == Configuration.GEOTHERMAL_BIG_TYPE
                            && infos.get(j).getDeviceType() == HDLApConfig.TYPE_GEOTHERMAL_MODULE
                            && infos.get(j).getChannelNum() == (getDatas.addBytes[0] & 0xFF)) {//2019-07-17
                            if(getDatas.addBytes.length >= 10) {
                                byte[] getBytes = devicesDataList.get(i).getAppliancesInfoList().get(j).getFeedbackState();
                                if (getBytes == null || getBytes.length < 10) {
@@ -2262,18 +2267,18 @@
                                HDLLog.E("地热状态反馈数据异常");
                            }
                            break;
                        default:
                            HDLLog.info("handleGeothermalStateData 没有找到匹配类型");
                            break;
                        break outter;
                    }else {
                        HDLLog.info("handleFreshAirStateData 没有找到匹配类型");
                    }
                }
                break outter;
            }
        }
    }
    /**
     * 此方法基本没用到,逻辑模块的控制信息已经在handleCtrlData中处理过了
     * <p>
hdl_core/src/main/java/com/hdl/sdk/hdl_core/HDLDeviceManger/Core/HDLUdpCore.java
@@ -7,6 +7,7 @@
import com.hdl.sdk.hdl_core.HDLDeviceManger.Bean.UdpDataBean;
import com.hdl.sdk.hdl_core.HDLDeviceManger.EventBusEvent.ThirdPartyBgmInfoEvent;
import com.hdl.sdk.hdl_core.Util.LogUtil.HDLLog;
import com.hdl.sdk.hdl_core.Util.TransformUtil.StringUtil;
import org.greenrobot.eventbus.EventBus;
@@ -39,7 +40,7 @@
     * @param sendDatas
     */
    public static void sendData(final Crc sendDatas) {
//        HDLLog.info("HDLsendData:  "+ StringUtil.ByteArrToHex(sendDatas.GetSendBytes(),0, sendDatas.GetSendBytes().length));
        HDLLog.info("HDLsendData:  "+ StringUtil.ByteArrToHex(sendDatas.GetSendBytes(),0, sendDatas.GetSendBytes().length));
//        sendTestCMD(sendDatas.GetSendBytes(), HDLTest.SEND_TEST_PORT);
        new Thread(new Runnable() {
@@ -337,7 +338,7 @@
            return;
        }
//        HDLLog.info("HDL ReceiveBytes:  "+ StringUtil.ByteArrToHex(receiveBytes,0, receiveBytes.length));
        HDLLog.info("HDL ReceiveBytes:  "+ StringUtil.ByteArrToHex(receiveBytes,0, receiveBytes.length));
        //校验是否为HDL 数据
        byte[] hdlDataVerify = new byte[10];