JLChen
2021-09-03 fb0dac414a5422139ea805923bde0884f055f58d
app/src/main/java/com/hdl/sdk/hdl_sdk/activity/GeothermalActivity.java
@@ -141,6 +141,7 @@
                }
            }
        });
@@ -161,27 +162,14 @@
                    return;
                }
                proDialog.show();
                switch (gModeState) {
//                HDLCommand.geothermalCtrlTemp(appliancesInfo, tempInt);//自动根据当前模式设置当前模式的温度。
                switch (gModeState) {
                    case 1:
                        //当前地热模式为普通
                        HDLCommand.geothermalCtrl(appliancesInfo, GeothermalParser.gNormalTemp, tempInt);//普通温度
                        ctrlId = GeothermalParser.gNormalTemp;
                        break;
                    case 2:
                        //当前地热模式为白天
                        HDLCommand.geothermalCtrl(appliancesInfo, GeothermalParser.gDayTemp, tempInt);//白天温度
                        ctrlId = GeothermalParser.gDayTemp;
                        break;
                    case 3:
                        //当前地热模式为夜间
                        HDLCommand.geothermalCtrl(appliancesInfo, GeothermalParser.gNightTemp, tempInt);//夜间温度
                        ctrlId = GeothermalParser.gNightTemp;
                        break;
                    case 4:
                        //当前地热模式为离开
                        HDLCommand.geothermalCtrl(appliancesInfo, GeothermalParser.gLeaveTemp, tempInt);//离开温度
                        ctrlId = GeothermalParser.gLeaveTemp;
                        HDLCommand.geothermalCtrlTemp(appliancesInfo, tempInt);//自动根据当前模式设置当前模式的温度。
                        break;
                    case 5:
                        proDialog.dismiss();
@@ -195,6 +183,41 @@
                        break;
                }
//                switch (gModeState) {
//
//                    case 1:
//                        //当前地热模式为普通
//                        HDLCommand.geothermalCtrl(appliancesInfo, GeothermalParser.gNormalTemp, tempInt);//普通温度
//                        ctrlId = GeothermalParser.gNormalTemp;
//                        break;
//                    case 2:
//                        //当前地热模式为白天
//                        HDLCommand.geothermalCtrl(appliancesInfo, GeothermalParser.gDayTemp, tempInt);//白天温度
//                        ctrlId = GeothermalParser.gDayTemp;
//                        break;
//                    case 3:
//                        //当前地热模式为夜间
//                        HDLCommand.geothermalCtrl(appliancesInfo, GeothermalParser.gNightTemp, tempInt);//夜间温度
//                        ctrlId = GeothermalParser.gNightTemp;
//                        break;
//                    case 4:
//                        //当前地热模式为离开
//                        HDLCommand.geothermalCtrl(appliancesInfo, GeothermalParser.gLeaveTemp, tempInt);//离开温度
//                        ctrlId = GeothermalParser.gLeaveTemp;
//                        break;
//                    case 5:
//                        proDialog.dismiss();
//                        //当前地热模式为自动
//                        showToast("自动模式,不能控制温度");
//                        break;
//                    default:
//                        proDialog.dismiss();
//                        //当前地热模式为自动
//                        showToast("未知模式,不能控制温度");
//                        break;
//
//                }
            }
@@ -389,6 +412,7 @@
            message = getSwichStateString(mGeothermalBackInfo.getIsOn());
            message += "\n" + getModeStateString(mGeothermalBackInfo.getgMode());
            message += "\n" + "室内温度:" + mGeothermalBackInfo.getgCurrentTemp();
            message += "\n" + "普通模式温度:" + mGeothermalBackInfo.getgNormalTemp();
            message += "\n" + "白天模式温度:" + mGeothermalBackInfo.getgDayTemp();
            message += "\n" + "夜间模式温度:" + mGeothermalBackInfo.getgNightTemp();
@@ -400,6 +424,6 @@
        mTextView.setText(message);
        showToast(message);
        HDLLog.I(message);
        HDLLog.I("地热"+message);
    }
}