compatiblity change to latest decode lib
This commit is contained in:
Binary file not shown.
@@ -24,7 +24,7 @@ public class ACStatus {
|
|||||||
private int acDisplay;
|
private int acDisplay;
|
||||||
private int acSleep;
|
private int acSleep;
|
||||||
private int acTimer;
|
private int acTimer;
|
||||||
private int changeWindDir;
|
private Integer changeWindDir;
|
||||||
|
|
||||||
public ACStatus() {
|
public ACStatus() {
|
||||||
this.acPower = Constants.ACPower.POWER_OFF.getValue();
|
this.acPower = Constants.ACPower.POWER_OFF.getValue();
|
||||||
@@ -39,7 +39,7 @@ public class ACStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ACStatus(int acPower, int acMode, int acTemp, int acWindSpeed, int acWindDir,
|
public ACStatus(int acPower, int acMode, int acTemp, int acWindSpeed, int acWindDir,
|
||||||
int acDisplay, int acSleep, int acTimer, int changeWindDir) {
|
int acDisplay, int acSleep, int acTimer, Integer changeWindDir) {
|
||||||
this.acPower = acPower;
|
this.acPower = acPower;
|
||||||
this.acTemp = acTemp;
|
this.acTemp = acTemp;
|
||||||
this.acMode = acMode;
|
this.acMode = acMode;
|
||||||
@@ -115,11 +115,11 @@ public class ACStatus {
|
|||||||
this.acTimer = acTimer;
|
this.acTimer = acTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getChangeWindDir() {
|
public Integer getChangeWindDir() {
|
||||||
return changeWindDir;
|
return changeWindDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChangeWindDir(int changeWindDir) {
|
public void setChangeWindDir(Integer changeWindDir) {
|
||||||
this.changeWindDir = changeWindDir;
|
this.changeWindDir = changeWindDir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,8 +116,7 @@ public class OperationLogic {
|
|||||||
return remoteIndex;
|
return remoteIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] decodeIR(RemoteIndex remoteIndex, ACStatus acStatus,
|
public int[] decodeIR(RemoteIndex remoteIndex, ACStatus acStatus, int keyCode) {
|
||||||
int keyCode, int changeWindDirection) {
|
|
||||||
try {
|
try {
|
||||||
int[] decoded = null;
|
int[] decoded = null;
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ public class DecodeRequest extends BaseRequest {
|
|||||||
private int indexId;
|
private int indexId;
|
||||||
private ACStatus acStatus;
|
private ACStatus acStatus;
|
||||||
private int keyCode;
|
private int keyCode;
|
||||||
private int changeWindDir;
|
private Integer changeWindDir;
|
||||||
private Integer directDecode;
|
private Integer directDecode;
|
||||||
private Integer paraData;
|
private Integer paraData;
|
||||||
|
|
||||||
public DecodeRequest(int indexId, ACStatus acStatus, int keyCode, int changeWindDir,
|
public DecodeRequest(int indexId, ACStatus acStatus, int keyCode, Integer changeWindDir,
|
||||||
Integer directDecode, Integer paraData) {
|
Integer directDecode, Integer paraData) {
|
||||||
this.indexId = indexId;
|
this.indexId = indexId;
|
||||||
this.acStatus = acStatus;
|
this.acStatus = acStatus;
|
||||||
@@ -59,11 +59,11 @@ public class DecodeRequest extends BaseRequest {
|
|||||||
this.keyCode = keyCode;
|
this.keyCode = keyCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getChangeWindDir() {
|
public Integer getChangeWindDir() {
|
||||||
return changeWindDir;
|
return changeWindDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChangeWindDir(int changeWindDir) {
|
public void setChangeWindDir(Integer changeWindDir) {
|
||||||
this.changeWindDir = changeWindDir;
|
this.changeWindDir = changeWindDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,10 +147,14 @@ public class IROperationService extends AbstractBaseService {
|
|||||||
int indexId = decodeRequest.getIndexId();
|
int indexId = decodeRequest.getIndexId();
|
||||||
ACStatus acStatus = decodeRequest.getAcStatus();
|
ACStatus acStatus = decodeRequest.getAcStatus();
|
||||||
int keyCode = decodeRequest.getKeyCode();
|
int keyCode = decodeRequest.getKeyCode();
|
||||||
int changeWindDir = decodeRequest.getChangeWindDir();
|
Integer changeWindDir = decodeRequest.getChangeWindDir();
|
||||||
Integer directDecode = decodeRequest.getDirectDecode();
|
Integer directDecode = decodeRequest.getDirectDecode();
|
||||||
Integer paraData = decodeRequest.getParaData();
|
Integer paraData = decodeRequest.getParaData();
|
||||||
RemoteIndex remoteIndex = null;
|
RemoteIndex remoteIndex = null;
|
||||||
|
|
||||||
|
if (null == acStatus.getChangeWindDir() && null != changeWindDir) {
|
||||||
|
acStatus.setChangeWindDir(changeWindDir);
|
||||||
|
}
|
||||||
int[] decoded = null;
|
int[] decoded = null;
|
||||||
LoggerUtil.getInstance().trace(TAG, "decodeIR entry, keyCode = " + keyCode + ", acStatus = " +
|
LoggerUtil.getInstance().trace(TAG, "decodeIR entry, keyCode = " + keyCode + ", acStatus = " +
|
||||||
new Gson().toJson(acStatus));
|
new Gson().toJson(acStatus));
|
||||||
@@ -187,7 +191,7 @@ public class IROperationService extends AbstractBaseService {
|
|||||||
}
|
}
|
||||||
// NOTE: here remoteIndex instances changes
|
// NOTE: here remoteIndex instances changes
|
||||||
remoteIndex = operationLogic.prepareBinary(remoteIndex.getId());
|
remoteIndex = operationLogic.prepareBinary(remoteIndex.getId());
|
||||||
decoded = operationLogic.decodeIR(remoteIndex, acStatus, keyCode, changeWindDir);
|
decoded = operationLogic.decodeIR(remoteIndex, acStatus, keyCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response.setEntity(decoded);
|
response.setEntity(decoded);
|
||||||
|
|||||||
Reference in New Issue
Block a user