Parcourir la source

난방 터치, 이미지 관련 수정

jslee(madeinlab) il y a 3 ans
Parent
commit
e8f2f0d70b

+ 1 - 1
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_heating/HeatingV2MainScreen.java

@@ -185,7 +185,7 @@ public class HeatingV2MainScreen extends WpadScreen {
                     }
                 }
                 else if (nRoomCnt == 7) {
-                    if (index == 2 || index == 5) {
+                    if (index == 2 || index == 5 || index == 6) {
                         BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
                         ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
                     }

+ 23 - 12
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_multi/HeatingV2PopupTestScreen.java

@@ -135,6 +135,8 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
 
     private int[] ROOM_POS = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
 
+    boolean bTouchButton = false;
+
     private class Data {
         private HeatingV2API.Data heatingV2;
         private boolean AmPm;               // true : PM    , false : AM
@@ -167,7 +169,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
     public String ReserveUse = "";
 
     private final int DEVICE_CMD_TEMP_CHANGE = 10000;
-    private final int DRAW_CMD_DELAY_CHANGE = 10000;
+    private final int DRAW_CMD_DELAY_CHANGE = 11100;
 
     HeatingData heatingData;
 
@@ -311,7 +313,7 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
     Timer timer;
     TimerTask TT;
 
-    static int delayTime = 800;
+    static int delayTime = 100;
 
     @SuppressLint("HandlerLeak")
     final Handler handler = new Handler() {
@@ -902,32 +904,38 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
                 }
                 else if (TargetId == ID.heatingV2Popup.tabDefault.button.TEMP_UP) {
                     DebugLogOutput("onTouchEvent [DefaultTab-TEMP_UP(short)] BUTTON !!!");
-                    //Sound().Play(SND.effect.TOUCH_LATCHED);
+                    bTouchButton = true;
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
                     Data_TempUpDn(true);
-                    Device_TempSetDelayed(10);
+                    //Device_TempSetDelayed(800);
+                    mData.TempSetDelayedEnable = true;
                     drawUpdate((byte) mCurrentRoomIndex);
                 }
                 else if (TargetId == ID.heatingV2Popup.tabDefault.button.TEMP_DN) {
                     DebugLogOutput("onTouchEvent [DefaultTab-TEMP_DN(short)] BUTTON !!!");
-                    //Sound().Play(SND.effect.TOUCH_LATCHED);
+                    bTouchButton = true;
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
                     Data_TempUpDn(false);
-                    Device_TempSetDelayed(10);
+                    //Device_TempSetDelayed(800);
+                    mData.TempSetDelayedEnable = true;
                     drawUpdate((byte) mCurrentRoomIndex);
                 }
             } else if (MoveEvent == MotionEvent.ACTION_POINTER_DOWN) {
                 if (TargetId == ID.heatingV2Popup.tabDefault.button.TEMP_UP) {
                     DebugLogOutput("onTouchEvent [DefaultTab-TEMP_UP(long)] BUTTON !!!");
+                    bTouchButton = true;
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     Data_TempUpDn(true);
-                    Device_TempSetDelayed(800);
-                    //Sample_ChangeValveReflect();
+                    //Device_TempSetDelayed(800);
+                    mData.TempSetDelayedEnable = true;
                     drawUpdate((byte) mCurrentRoomIndex);
                 } else if (TargetId == ID.heatingV2Popup.tabDefault.button.TEMP_DN) {
                     DebugLogOutput("onTouchEvent [DefaultTab-TEMP_DN(long)] BUTTON !!!");
+                    bTouchButton = true;
                     Sound().Play(SND.effect.TOUCH_LATCHED);
                     Data_TempUpDn(false);
-                    Device_TempSetDelayed(800);
-                    //Sample_ChangeValveReflect();
+                    //Device_TempSetDelayed(800);
+                    mData.TempSetDelayedEnable = true;
                     drawUpdate((byte) mCurrentRoomIndex);
                 }
             }
@@ -1421,8 +1429,11 @@ public class HeatingV2PopupTestScreen extends WpadScreen {
     private void Device_ControlTemp(byte RoomIdx, double setTemp) {
         DebugLogOutput("[Device_ControlTemp] - (RoomIdx:" + RoomIdx + ", setTemp:" + setTemp + ")");
         //난방 개별 제어.
-        delayTime = 800;
-        requestMultiCommand(JSON.KIND.Individual, JSON.REASON.Control, RoomIdx, "set_temp", 0, setTemp);
+        delayTime = 100;
+        //난방 온도 변경이 있었을 경우만 전송
+        if(bTouchButton) {
+            requestMultiCommand(JSON.KIND.Individual, JSON.REASON.Control, RoomIdx, "set_temp", 0, setTemp);
+        }
         //return Device_SetEachRoomStatus(RoomIdx, HeatingV2.MODE.Idle, setTemp);
     }
 

+ 1 - 1
WallPadHomeCtrl/src/main/java/kr/co/icontrols/wallpadhomectrl/screen/screen_multi/HeatingV2TestScreen.java

@@ -188,7 +188,7 @@ public class HeatingV2TestScreen extends WpadScreen {
                     ViewRegistration(getLayout(), BACKGROUND, Common.ImgPosion.GetX(left), Common.ImgPosion.GetY(top));
                 }
                 else if (nRoomCnt == 7) {
-                    if (index == 2 || index == 5) {
+                    if (index == 2 || index == 5 || index == 6) {
                         BACKGROUND = new WpadImageView(getContext(), TOUCH_KIND.NONE, 291, 250, R.drawable.bg_heat_box_room_3, R.drawable.bg_heat_box_room_3, ID.heatingV2main.image.ROOM_BACKGROUND_1 + index);
                     }
                     else {