| | |
| | | } |
| | | |
| | | /** |
| | | * 控制地热模块温度 |
| | | * |
| | | * @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 |