|
@@ -88,8 +88,8 @@ public class LightKnxPopupRoomScreen extends WpadScreen {
|
|
|
public static final int min = 1;
|
|
|
public int SeekBarValue = 1;
|
|
|
|
|
|
- //private final int[] ROOM_POS = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
|
|
|
- private final int[] ROOM_POS = {10,11,12,13,14,15,16,7,8,9,0,1,2,3,4,5,6,17,18,19,20};
|
|
|
+ private final int[] ROOM_POS = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
|
|
|
+ //private final int[] ROOM_POS = {10,11,12,13,14,15,16,7,8,9,0,1,2,3,4,5,6,17,18,19,20};
|
|
|
|
|
|
|
|
|
private String[] mDefaultRoomNameList = new String[]{"거실", "거실", "침실4", "침실1", "파우더룸", "침실2", "주방1", "침실3",
|
|
@@ -229,6 +229,50 @@ public class LightKnxPopupRoomScreen extends WpadScreen {
|
|
|
//OPERATION_MODE = Common.MODE_BUSINESS_SAMPLE;
|
|
|
mData = new Data_KnxLiv();
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ // 2. Device API Load & Update
|
|
|
+ DebugLogOutput("[Create] - Step2 : Device API Load & Update");
|
|
|
+ if (OPERATION_MODE == Common.MODE_NOMAL) {
|
|
|
+ DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
|
|
|
+ if (Device_ApiLoad(wpapi) >= 0) Device_Update(false, Common.INDEX_ALL);
|
|
|
+ } else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
|
|
|
+ DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
|
|
|
+ // 샘플 데이터 로드
|
|
|
+ LoadSampleData_NewLiv();
|
|
|
+ } else {
|
|
|
+ DebugLogOutput("OPERATION_MODE = Other (" + OPERATION_MODE + " ... Change Mode -> MODE_NOMAL");
|
|
|
+ OPERATION_MODE = Common.MODE_NOMAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ AllEMcount = mData.MasterController.Info.Light_SwitchCount + mData.MasterController.Info.Bad_EnergyMeterCount + mData.MasterController.Info.Liv_EnergyMeterCount;
|
|
|
+
|
|
|
+ WallpadDeviceSet devSet = new WallpadDeviceSet(this.getContext());
|
|
|
+ String[] strValue = devSet.GetSettingData("UI순서");
|
|
|
+ devSet.closeDB();
|
|
|
+
|
|
|
+ // 현대건설 더 펜트하우스 서버에서 설정된 UI 순서를 이용하도록 한다.
|
|
|
+ if( strValue != null ) {
|
|
|
+ String strLight = strValue[1].substring( (strValue[1].indexOf("조명(") + 3) , (strValue[1].indexOf(")난방(")));
|
|
|
+ //String strHeating = strValue[1].substring( (strValue[1].indexOf("난방(") + 3) , (strValue[1].indexOf(")에어컨(")));
|
|
|
+ //String strAircon = strValue[1].substring( (strValue[1].indexOf("에어컨(") + 4) , (strValue[1].indexOf("))")));
|
|
|
+ //DebugLogOutput("[Create] - room name strlight " + strLight);
|
|
|
+ //DebugLogOutput("[Create] - room name strHeating " + strHeating);
|
|
|
+ //DebugLogOutput("[Create] - room name strAircon " + strAircon);
|
|
|
+
|
|
|
+ int strLightCount = Integer.valueOf(strLight.substring(0, strLight.indexOf(":")));
|
|
|
+
|
|
|
+ if(strLightCount==(mData.MasterController.Info.Bad_EnergyMeterCount + mData.MasterController.Info.Liv_EnergyMeterCount)){
|
|
|
+ //개수가 일치하는 경우에 적용
|
|
|
+ strLight = strLight.substring(strLight.indexOf(":")+1);
|
|
|
+ String[] strDataSeq = strLight.split("_");
|
|
|
+
|
|
|
+ for (int i = 0; i < strDataSeq.length; i++) {
|
|
|
+ ROOM_POS[i] = Integer.valueOf(strDataSeq[i])-1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Intent intent = super.getScreenIntent();
|
|
|
if (intent != null) {
|
|
|
// 시작할 룸인덱스
|
|
@@ -249,22 +293,6 @@ public class LightKnxPopupRoomScreen extends WpadScreen {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 2. Device API Load & Update
|
|
|
- DebugLogOutput("[Create] - Step2 : Device API Load & Update");
|
|
|
- if (OPERATION_MODE == Common.MODE_NOMAL) {
|
|
|
- DebugLogOutput("OPERATION_MODE = MODE_NOMAL");
|
|
|
- if (Device_ApiLoad(wpapi) >= 0) Device_Update(false, Common.INDEX_ALL);
|
|
|
- } else if (OPERATION_MODE == Common.MODE_BUSINESS_SAMPLE) {
|
|
|
- DebugLogOutput("OPERATION_MODE = MODE_BUSINESS_SAMPLE");
|
|
|
- // 샘플 데이터 로드
|
|
|
- LoadSampleData_NewLiv();
|
|
|
- } else {
|
|
|
- DebugLogOutput("OPERATION_MODE = Other (" + OPERATION_MODE + " ... Change Mode -> MODE_NOMAL");
|
|
|
- OPERATION_MODE = Common.MODE_NOMAL;
|
|
|
- }
|
|
|
-
|
|
|
- AllEMcount = mData.MasterController.Info.Light_SwitchCount + mData.MasterController.Info.Bad_EnergyMeterCount + mData.MasterController.Info.Liv_EnergyMeterCount;
|
|
|
-
|
|
|
// 3. Image Create
|
|
|
DebugLogOutput("[Create] - Step3 : Image Create");
|
|
|
Background = new WpadImageView(context, TOUCH_KIND.NONE, 990, 680, R.drawable.bg_popup, 0, ID.lightKnxPopupRoom.image.BACKGROUND);
|