|
@@ -25,7 +25,6 @@ import android.widget.RelativeLayout;
|
|
|
import com.artncore.commons.DataClasses;
|
|
|
import com.artncore.commons.DataClasses.HeatingV2;
|
|
|
import com.artncore.wallpadapi.HeatingV2API;
|
|
|
-import com.artncore.wallpadapi.WallPadAPI;
|
|
|
import com.google.gson.Gson;
|
|
|
import com.util.LogUtil;
|
|
|
|
|
@@ -36,7 +35,6 @@ import org.json.JSONObject;
|
|
|
import java.util.Timer;
|
|
|
import java.util.TimerTask;
|
|
|
|
|
|
-import kr.co.icontrols.wallpadhomectrl.MainActivity;
|
|
|
import kr.co.icontrols.wallpadhomectrl.PopupActivity;
|
|
|
import kr.co.icontrols.wallpadhomectrl.R;
|
|
|
import kr.co.icontrols.wallpadhomectrl.data.HeatingArrayData;
|
|
@@ -266,10 +264,12 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
// 반복실행할 구문
|
|
|
- updateData();
|
|
|
+ if(!mData.TempSetDelayedEnable) {
|
|
|
+ updateData();
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
- timer.schedule(TT, delay, 2500); //Timer 실행
|
|
|
+ timer.schedule(TT, delay, 3000); //Timer 실행
|
|
|
}catch (Exception e){}
|
|
|
}
|
|
|
private void resetTimer(){
|
|
@@ -588,8 +588,10 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
}
|
|
|
D_TempUpBtn = new WpadImageView(context, TOUCH_KIND.BUTTON_LC, 174, 81, R.drawable.heating_popup_up, R.drawable.heating_popup_up_p, ID.heatingV2Popup.tabDefault.button.TEMP_UP);
|
|
|
ViewRegistration(TabDefaultLayout, D_TempUpBtn, Common.PopupNomalMarginLEFT(856), Common.PopupNomalMarginTOP(517 - TABMarginTop));
|
|
|
+ D_TempUpBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
|
|
|
D_TempDownBtn = new WpadImageView(context, TOUCH_KIND.BUTTON_LC, 174, 81, R.drawable.heating_popup_down, R.drawable.heating_popup_down_p, ID.heatingV2Popup.tabDefault.button.TEMP_DN);
|
|
|
ViewRegistration(TabDefaultLayout, D_TempDownBtn, Common.PopupNomalMarginLEFT(856), Common.PopupNomalMarginTOP(598 - TABMarginTop));
|
|
|
+ D_TempDownBtn.setTouchDelayMs(Common.BTN_DELAY_DEVCTRL);
|
|
|
|
|
|
D_NowTempText = new WpadTextView(context, false, 174, 120, Gravity.CENTER, Color.WHITE, Common.fontsize._56, false, ID.heatingV2Popup.tabDefault.text.NOW_TEMP);
|
|
|
ViewRegistration(TabDefaultLayout, D_NowTempText, Common.PopupNomalMarginLEFT(488), Common.PopupNomalMarginTOP(559 - TABMarginTop));
|
|
@@ -690,8 +692,8 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
SetManualStr(NowTab, ReserveUse, SleepUse);
|
|
|
|
|
|
timer = new Timer();
|
|
|
- //startRefreshTimer(3000);
|
|
|
- updateData();
|
|
|
+ startRefreshTimer(3000);
|
|
|
+ //updateData();
|
|
|
}
|
|
|
|
|
|
private boolean setManualBtnVisible(boolean bEnable) {
|
|
@@ -722,6 +724,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
protected void onClose() {
|
|
|
super.onClose();
|
|
|
|
|
|
+ //Device_NowAModeSet();
|
|
|
Device_NowTempSet();
|
|
|
Data_CheckReservation();
|
|
|
Data_CheckSleep();
|
|
@@ -784,6 +787,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
Sound().Play(SND.effect.TOUCH_LATCHED);
|
|
|
|
|
|
if (OPERATION_MODE == Common.MODE_NOMAL) {
|
|
|
+ //Device_NowAModeSet();
|
|
|
Device_NowTempSet();
|
|
|
Data_CheckReservation();
|
|
|
Data_CheckSleep();
|
|
@@ -804,7 +808,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
else if (TargetId == ID.heatingV2Popup.button.ROOMSEL_RIGHT) {
|
|
|
DebugLogOutput("onTouchEvent [ROOMSEL_RIGHT] BUTTON !!!");
|
|
|
Sound().Play(SND.effect.TOUCH_LATCHED);
|
|
|
-
|
|
|
+ //Device_NowAModeSet();
|
|
|
Device_NowTempSet();
|
|
|
Data_CheckReservation();
|
|
|
Data_CheckSleep();
|
|
@@ -831,9 +835,15 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
//탭이 변경되면 상태 값을 새로 받아 온다.
|
|
|
resetTimer();
|
|
|
//예약은 상태를 주기적으로 갱신하면 설정하면서 값이 바뀌게 되어 이상함.
|
|
|
- updateData();
|
|
|
+ if(TargetId==ID.heatingV2Popup.text.TAB_DEFAULT){
|
|
|
+ startRefreshTimer(300);
|
|
|
+ }else{
|
|
|
+ updateData();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if (OPERATION_MODE == Common.MODE_NOMAL) {
|
|
|
+ //Device_NowAModeSet();
|
|
|
Device_NowTempSet();
|
|
|
Data_CheckReservation();
|
|
|
Data_CheckSleep();
|
|
@@ -860,6 +870,9 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
ChangeMode = HeatingV2.MODE.HeatingON;
|
|
|
//난방 개별 제어.
|
|
|
delayTime = 100;
|
|
|
+ //난방 멀티제어 팝업 경우 팝업을 닫거나, 방이동, 탭이동일 경우에 하도록 한다.
|
|
|
+ //Device_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
+
|
|
|
requestMultiCommand(JSON.KIND.Individual, JSON.REASON.Control, this.mCurrentRoomIndex, "set_mode", 0, ChangeMode);
|
|
|
//Sample_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
}
|
|
@@ -869,6 +882,8 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
byte ChangeMode = HeatingV2.MODE.HeatingON;
|
|
|
//난방 개별 제어.
|
|
|
delayTime = 100;
|
|
|
+ //난방 멀티제어 팝업 경우 팝업을 닫거나, 방이동, 탭이동일 경우에 하도록 한다.
|
|
|
+ //Device_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
requestMultiCommand(JSON.KIND.Individual, JSON.REASON.Control, this.mCurrentRoomIndex, "set_mode", 0, ChangeMode);
|
|
|
//Sample_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
}
|
|
@@ -879,6 +894,8 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
|
|
|
//난방 개별 제어.
|
|
|
delayTime = 100;
|
|
|
+ //난방 멀티제어 팝업 경우 팝업을 닫거나, 방이동, 탭이동일 경우에 하도록 한다.
|
|
|
+ //Device_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
requestMultiCommand(JSON.KIND.Individual, JSON.REASON.Control, this.mCurrentRoomIndex, "set_mode", 0, ChangeMode);
|
|
|
//Sample_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
}
|
|
@@ -889,6 +906,8 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
|
|
|
//난방 개별 제어.
|
|
|
delayTime = 100;
|
|
|
+ //난방 멀티제어 팝업 경우 팝업을 닫거나, 방이동, 탭이동일 경우에 하도록 한다.
|
|
|
+ //Device_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
requestMultiCommand(JSON.KIND.Individual, JSON.REASON.Control, this.mCurrentRoomIndex, "set_mode", 0, ChangeMode);
|
|
|
//Sample_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
}
|
|
@@ -898,6 +917,8 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
byte ChangeMode = HeatingV2.MODE.Outing;
|
|
|
//난방 개별 제어.
|
|
|
delayTime = 100;
|
|
|
+ //난방 멀티제어 팝업 경우 팝업을 닫거나, 방이동, 탭이동일 경우에 하도록 한다.
|
|
|
+ //Device_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
requestMultiCommand(JSON.KIND.Individual, JSON.REASON.Control, this.mCurrentRoomIndex, "set_mode", 0, ChangeMode);
|
|
|
//Sample_ControlMode((byte) this.mCurrentRoomIndex, ChangeMode);
|
|
|
}
|
|
@@ -907,7 +928,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
bTouchButton = true;
|
|
|
Sound().Play(SND.effect.TOUCH_LATCHED);
|
|
|
Data_TempUpDn(true);
|
|
|
- //Device_TempSetDelayed(800);
|
|
|
+ Device_TempSetDelayed(800);
|
|
|
mData.TempSetDelayedEnable = true;
|
|
|
drawUpdate((byte) mCurrentRoomIndex);
|
|
|
}
|
|
@@ -916,7 +937,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
bTouchButton = true;
|
|
|
Sound().Play(SND.effect.TOUCH_LATCHED);
|
|
|
Data_TempUpDn(false);
|
|
|
- //Device_TempSetDelayed(800);
|
|
|
+ Device_TempSetDelayed(800);
|
|
|
mData.TempSetDelayedEnable = true;
|
|
|
drawUpdate((byte) mCurrentRoomIndex);
|
|
|
}
|
|
@@ -926,7 +947,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
bTouchButton = true;
|
|
|
Sound().Play(SND.effect.TOUCH_LATCHED);
|
|
|
Data_TempUpDn(true);
|
|
|
- //Device_TempSetDelayed(800);
|
|
|
+ Device_TempSetDelayed(800);
|
|
|
mData.TempSetDelayedEnable = true;
|
|
|
drawUpdate((byte) mCurrentRoomIndex);
|
|
|
} else if (TargetId == ID.heatingV2Popup.tabDefault.button.TEMP_DN) {
|
|
@@ -934,7 +955,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
bTouchButton = true;
|
|
|
Sound().Play(SND.effect.TOUCH_LATCHED);
|
|
|
Data_TempUpDn(false);
|
|
|
- //Device_TempSetDelayed(800);
|
|
|
+ Device_TempSetDelayed(800);
|
|
|
mData.TempSetDelayedEnable = true;
|
|
|
drawUpdate((byte) mCurrentRoomIndex);
|
|
|
}
|
|
@@ -1491,7 +1512,8 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
try {
|
|
|
if (msg.what == DRAW_CMD_DELAY_CHANGE) {
|
|
|
Sound().Play(SND.effect.TOUCH_LATCHED);
|
|
|
- updateData();
|
|
|
+ startRefreshTimer(500);
|
|
|
+ //updateData();
|
|
|
}
|
|
|
} catch (RuntimeException re) {
|
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
@@ -1645,6 +1667,15 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
//Device_SetSleep((byte) mCurrentRoomIndex, SetTemp, SetTime);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 난방 모드를 제어한다.
|
|
|
+ * 팝업창이 닫힐 때 자동으로 호출됨<br>
|
|
|
+ */
|
|
|
+ private void Device_NowAModeSet() {
|
|
|
+ HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[this.mCurrentRoomIndex];
|
|
|
+ requestMultiCommand(JSON.KIND.Individual, JSON.REASON.Control, this.mCurrentRoomIndex, "set_mode", 0, roomData.Mode);
|
|
|
+ }
|
|
|
+
|
|
|
// =================================================================================================
|
|
|
// [[ Sample ]] region
|
|
|
// =================================================================================================
|
|
@@ -1693,6 +1724,24 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
|
|
|
//mData.heatingV2.Device.info = info;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 난방 모드 UI를 변경한다.
|
|
|
+ */
|
|
|
+ private void Device_ControlMode(byte RoomIdx, byte DeiveMode) {
|
|
|
+ if (mData == null) return;
|
|
|
+ if (mData.heatingV2.Device.Room == null) return;
|
|
|
+
|
|
|
+ HeatingV2.RoomData roomData = mData.heatingV2.Device.Room[RoomIdx];
|
|
|
+ roomData.Mode = DeiveMode;
|
|
|
+
|
|
|
+ if (Data_DriveModeConverterOnOff(RoomIdx)) {
|
|
|
+ if (roomData.SetTemp > roomData.NowTemp) roomData.bValveStatus = true;
|
|
|
+ else roomData.bValveStatus = false;
|
|
|
+ } else roomData.bValveStatus = false;
|
|
|
+
|
|
|
+ drawUpdate(RoomIdx);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* (영업샘플모드) 가상으로 난방 전원을 ON/OFF 한다.
|
|
|
*/
|