updated decode sdk example
This commit is contained in:
@@ -161,15 +161,16 @@ public class ControlFragment extends Fragment implements View.OnClickListener {
|
||||
int inputKeyCode;
|
||||
ACStatus acStatus = new ACStatus();
|
||||
/* decode SDK - decode according to key code */
|
||||
if (Constants.CategoryID.AIR_CONDITIONER.getValue() == mCurrentRemoteControl.getCategoryId()) {
|
||||
acStatus.setAcPower(Constants.ACPower.POWER_OFF.getValue());
|
||||
acStatus.setAcMode(Constants.ACMode.MODE_COOL.getValue());
|
||||
acStatus.setAcTemp(Constants.ACTemperature.TEMP_24.getValue());
|
||||
acStatus.setAcWindSpeed(Constants.ACWindSpeed.SPEED_AUTO.getValue());
|
||||
acStatus.setAcWindDir(Constants.ACSwing.SWING_ON.getValue());
|
||||
acStatus.setAcDisplay(0);
|
||||
acStatus.setAcTimer(0);
|
||||
acStatus.setAcSleep(0);
|
||||
if (Constants.CategoryID.AIR_CONDITIONER.getValue() ==
|
||||
mCurrentRemoteControl.getCategoryId()) {
|
||||
acStatus.setACPower(Constants.ACPower.POWER_OFF.getValue());
|
||||
acStatus.setACMode(Constants.ACMode.MODE_COOL.getValue());
|
||||
acStatus.setACTemp(Constants.ACTemperature.TEMP_24.getValue());
|
||||
acStatus.setACWindSpeed(Constants.ACWindSpeed.SPEED_AUTO.getValue());
|
||||
acStatus.setACWindDir(Constants.ACSwing.SWING_ON.getValue());
|
||||
acStatus.setACDisplay(0);
|
||||
acStatus.setACTimer(0);
|
||||
acStatus.setACSleep(0);
|
||||
|
||||
switch(keyCode) {
|
||||
case KEY_POWER:
|
||||
|
||||
@@ -48,67 +48,67 @@ public class ACStatus {
|
||||
this.acTimer = acTimer;
|
||||
}
|
||||
|
||||
public int getAcPower() {
|
||||
public int getACPower() {
|
||||
return acPower;
|
||||
}
|
||||
|
||||
public void setAcPower(int acPower) {
|
||||
public void setACPower(int acPower) {
|
||||
this.acPower = acPower;
|
||||
}
|
||||
|
||||
public int getAcTemp() {
|
||||
public int getACTemp() {
|
||||
return acTemp;
|
||||
}
|
||||
|
||||
public void setAcTemp(int acTemp) {
|
||||
public void setACTemp(int acTemp) {
|
||||
this.acTemp = acTemp;
|
||||
}
|
||||
|
||||
public int getAcMode() {
|
||||
public int getACMode() {
|
||||
return acMode;
|
||||
}
|
||||
|
||||
public void setAcMode(int acMode) {
|
||||
public void setACMode(int acMode) {
|
||||
this.acMode = acMode;
|
||||
}
|
||||
|
||||
public int getAcWindDir() {
|
||||
public int getACWindDir() {
|
||||
return acWindDir;
|
||||
}
|
||||
|
||||
public void setAcWindDir(int acWindDir) {
|
||||
public void setACWindDir(int acWindDir) {
|
||||
this.acWindDir = acWindDir;
|
||||
}
|
||||
|
||||
public int getAcWindSpeed() {
|
||||
public int getACWindSpeed() {
|
||||
return acWindSpeed;
|
||||
}
|
||||
|
||||
public void setAcWindSpeed(int acWindSpeed) {
|
||||
public void setACWindSpeed(int acWindSpeed) {
|
||||
this.acWindSpeed = acWindSpeed;
|
||||
}
|
||||
|
||||
public int getAcDisplay() {
|
||||
public int getACDisplay() {
|
||||
return acDisplay;
|
||||
}
|
||||
|
||||
public void setAcDisplay(int acDisplay) {
|
||||
public void setACDisplay(int acDisplay) {
|
||||
this.acDisplay = acDisplay;
|
||||
}
|
||||
|
||||
public int getAcSleep() {
|
||||
public int getACSleep() {
|
||||
return acSleep;
|
||||
}
|
||||
|
||||
public void setAcSleep(int acSleep) {
|
||||
public void setACSleep(int acSleep) {
|
||||
this.acSleep = acSleep;
|
||||
}
|
||||
|
||||
public int getAcTimer() {
|
||||
public int getACTimer() {
|
||||
return acTimer;
|
||||
}
|
||||
|
||||
public void setAcTimer(int acTimer) {
|
||||
public void setACTimer(int acTimer) {
|
||||
this.acTimer = acTimer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user