| | |
| | | |
| | | /** |
| | | * 生成默认数据 |
| | | * |
| | | * 0 开关状态 |
| | | * 1 模式 |
| | | * 2 温度 |
| | | * 3 风速 |
| | | * 4 |
| | | * @return |
| | | */ |
| | | public static byte[] getNewAcByte() { |
| | |
| | | |
| | | public static byte[] getAcAddByte(AppliancesInfo appliancesInfo, int type, int state) { |
| | | try { |
| | | AppliancesInfo newInfo = null; |
| | | AppliancesInfo newInfo = appliancesInfo; |
| | | byte[] airBytes = null; |
| | | outter: |
| | | for (int i = 0; i < HDLDeviceManager.devicesDataList.size(); i++) { |
| | |
| | | |
| | | byte[] addBytes = new byte[13]; |
| | | if (airBytes != null && airBytes.length >= 6) { |
| | | //2020-05-28 如果温度为0自动修改为28 |
| | | if((airBytes[2] & 0xff) == 0){ |
| | | airBytes[2] = (byte)28; |
| | | } |
| | | |
| | | addBytes[0] = (byte) newInfo.getChannelNum(); |
| | | addBytes[1] = 0; |
| | | addBytes[2] = airBytes[4]; |