2020-06-01 1.如果温度为0自动修改为28
| | |
| | | |
| | | HDL XW Android SDK Copyright (c) 2019 HDL Inc. |
| | | |
| | | SDK 版本:hdl_lib_v1.7.0.20200601_beta |
| | | 1.如果温度为0自动修改为28 |
| | | |
| | | SDK 版本:hdl_lib_v1.6.9.20200316_beta |
| | | 1.增加小类是3的音乐播放器支持; |
| | | 2.加地热模块单独控制温度接口,接口自动根据当前模式设置当前模式的温度参数,不需要上层自己判断;(HDLCommand.geothermalCtrlTemp()) |
| | |
| | | <resources> |
| | | <string name="app_name">HDL_SDK</string> |
| | | <string name="app_version">hdl_lib_v1.6.6.20200305_beta</string> |
| | | <string name="app_version">hdl_lib_v1.7.0.20200601_beta</string> |
| | | <string name="btn_save">保存</string> |
| | | <string name="et_subnetid_hint">子网号(范围0 - 254)</string> |
| | | <string name="et_deviceid_hint">设备号号(范围0 - 254)</string> |
| | |
| | | defaultConfig { |
| | | minSdkVersion 17 |
| | | targetSdkVersion 28 |
| | | versionCode 1 |
| | | versionName "1.0.7" |
| | | versionCode 10 |
| | | versionName "1.7.0" |
| | | |
| | | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| | | |
| | |
| | | } |
| | | buildToolsVersion '28.0.3' |
| | | |
| | | /** |
| | | * 打包自动命名 |
| | | */ |
| | | android.libraryVariants.all { variant -> |
| | | variant.outputs.all { |
| | | outputFileName = "hdl_lib_V" + |
| | | defaultConfig.versionName + ".B" + defaultConfig.versionCode + "." + releaseTime() + "_beta.aar" |
| | | } |
| | | } |
| | | |
| | | // lintOptions { |
| | | // abortOnError false |
| | | // warning 'InvalidPackage' |
| | | // } |
| | | } |
| | | |
| | | def releaseTime() { |
| | | return new Date().format("yyyyMMdd") |
| | | } |
| | | |
| | | dependencies { |
| | | implementation fileTree(include: ['*.jar'], dir: 'libs') |
| | | implementation 'com.android.support:appcompat-v7:28+' |
| | |
| | | |
| | | /** |
| | | * 生成默认数据 |
| | | * |
| | | * 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]; |
| | |
| | | if (info.getDeviceType() == HDLApConfig.TYPE_AC_PANEL) { |
| | | addSendData(info, AirCtrlParser.getAirPanelAddByte(type, state), Configuration.CONTROL); |
| | | } else { |
| | | if (AirCtrlParser.getAcAddByte(info, type, state) != null) { |
| | | byte[] airbytes = AirCtrlParser.getAcAddByte(info, type, state); |
| | | // String airString = "发送的HVAC bytes:"; |
| | | // for(int i = 0;i<airbytes.length;i++){ |
| | | // airString += (airbytes[i] & 0xff) +","; |
| | | // } |
| | | // HDLLog.info(airString); |
| | | byte[] airbytes = AirCtrlParser.getAcAddByte(info, type, state); |
| | | if (airbytes != null) { |
| | | addSendData(info, airbytes, Configuration.CONTROL); |
| | | } |
| | | |
| | | } |
| | | |
| | | |