提交 7086507c authored 作者: linzhenjie's avatar linzhenjie

晾衣架加电源控制参数

上级 b2570b11
......@@ -475,7 +475,8 @@ public class ShDeviceController {
Integer UVState = (Integer) params.get("UVState");
Integer fanStatus = (Integer) params.get("fanStatus");
Integer dryingHeatingState = (Integer) params.get("dryingHeatingState");
if(StringUtils.isBlank(mac, operatingStatus, light, UVState, fanStatus, dryingHeatingState)) {
Integer powerStatus = (Integer) params.get("powerStatus");
if(StringUtils.isBlank(mac, operatingStatus, light, UVState, fanStatus, dryingHeatingState, powerStatus)) {
return R.error("缺少参数");
}
......@@ -483,10 +484,10 @@ public class ShDeviceController {
protocol.setReceiveId(mac);
if (StringUtils.isBlank(type)) {
protocol.setContent(ByteUtils.int2Hex(operatingStatus) + ByteUtils.int2Hex(light) +
ByteUtils.int2Hex(UVState) + ByteUtils.int2Hex(fanStatus) + ByteUtils.int2Hex(dryingHeatingState) + "010000");
ByteUtils.int2Hex(UVState) + ByteUtils.int2Hex(fanStatus) + ByteUtils.int2Hex(dryingHeatingState) + ByteUtils.int2Hex(powerStatus) + "0000");
}else {
protocol.setContent(ByteUtils.int2Hex(operatingStatus) + ByteUtils.int2Hex(light) +
ByteUtils.int2Hex(UVState) + ByteUtils.int2Hex(fanStatus) + ByteUtils.int2Hex(dryingHeatingState) + "0100" + type);
ByteUtils.int2Hex(UVState) + ByteUtils.int2Hex(fanStatus) + ByteUtils.int2Hex(dryingHeatingState) + ByteUtils.int2Hex(powerStatus) + "00" + type);
}
protocol.setDeviceType("07");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论