updated decode sdk example

This commit is contained in:
2017-07-09 08:26:35 +08:00
parent feb30d48e5
commit 8ff3e96f16
2 changed files with 26 additions and 25 deletions

View File

@@ -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: