JLChen
2019-08-02 425b2352c57a377b1594097a69aabcc87207b683
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;
            }
        }
    }
}