diff --git a/src/main/java/net/irext/decode/sdk/IRDecode.java b/src/main/java/net/irext/decode/sdk/IRDecode.java index be4f794..ea51710 100644 --- a/src/main/java/net/irext/decode/sdk/IRDecode.java +++ b/src/main/java/net/irext/decode/sdk/IRDecode.java @@ -42,6 +42,8 @@ public class IRDecode { private native int irACGetSupportedSwing(int acMode); + private native int irACGetSupportedWindDirection(int acMode); + private static IRDecode mInstance; public static IRDecode getInstance() { @@ -118,4 +120,9 @@ public class IRDecode { } return retSupportedSwing; } + + public int getACSupportedWindDirection(int acMode) { + // how many directions supported by specific AC + return irACGetSupportedWindDirection(acMode); + } } diff --git a/src/main/java/net/irext/decode/service/businesslogic/DecodeLogic.java b/src/main/java/net/irext/decode/service/businesslogic/DecodeLogic.java index df7739f..23d93c5 100644 --- a/src/main/java/net/irext/decode/service/businesslogic/DecodeLogic.java +++ b/src/main/java/net/irext/decode/service/businesslogic/DecodeLogic.java @@ -156,10 +156,20 @@ public class DecodeLogic { LoggerUtil.getInstance().trace(TAG, "supported swing [" + i + "] = " + supportedSwing[i]); } } + + int supportedWindDirection = irDecode.getACSupportedWindDirection(mode); + + if (DEBUG) { + LoggerUtil.getInstance().trace(TAG, + "supported wind directions for mode : " + mode + + " = " + supportedWindDirection); + } + acParameters.setTempMax(temperatureRange.getTempMax()); acParameters.setTempMin(temperatureRange.getTempMin()); acParameters.setSupportedWindSpeed(supportedWindSpeed); acParameters.setSupportedSwing(supportedSwing); + acParameters.setSupportedWindSpeed(supportedWindSpeed); } } irDecode.closeBinary(); diff --git a/src/main/java/net/irext/decode/service/model/ACParameters.java b/src/main/java/net/irext/decode/service/model/ACParameters.java index 6daa05f..d12a29e 100644 --- a/src/main/java/net/irext/decode/service/model/ACParameters.java +++ b/src/main/java/net/irext/decode/service/model/ACParameters.java @@ -16,14 +16,17 @@ public class ACParameters { private int [] supportedModes; private int []supportedWindSpeed; private int []supportedSwing; + private int []supportedWindDirections; public ACParameters(int tempMin, int tempMax, int[] supportedModes, - int[] supportedWindSpeed, int[] supportedSwing) { + int[] supportedWindSpeed, + int[] supportedSwing, int[] supportedWindDirections) { this.tempMin = tempMin; this.tempMax = tempMax; this.supportedModes = supportedModes; this.supportedWindSpeed = supportedWindSpeed; this.supportedSwing = supportedSwing; + this.supportedWindDirections = supportedWindDirections; } public ACParameters() { @@ -69,4 +72,12 @@ public class ACParameters { public void setSupportedSwing(int[] supportedSwing) { this.supportedSwing = supportedSwing; } + + public int[] getSupportedWindDirections() { + return supportedWindDirections; + } + + public void setSupportedWindDirections(int[] supportedWindDirections) { + this.supportedWindDirections = supportedWindDirections; + } }