|
@@ -98,6 +98,9 @@ public class WallpadDeviceSet extends wallpaddbmgr {
|
|
public static final int DO_NOT_USE = 0;
|
|
public static final int DO_NOT_USE = 0;
|
|
public static final int DO_USE = 1;
|
|
public static final int DO_USE = 1;
|
|
|
|
|
|
|
|
+ public static final int Curtain = 1;
|
|
|
|
+ public static final int RollScreen = 2;
|
|
|
|
+
|
|
|
|
|
|
public static final int LIGHT_TYPE_LIVING = 11;
|
|
public static final int LIGHT_TYPE_LIVING = 11;
|
|
public static final int LIGHT_TYPE_ROOM = 12;
|
|
public static final int LIGHT_TYPE_ROOM = 12;
|
|
@@ -570,17 +573,57 @@ public class WallpadDeviceSet extends wallpaddbmgr {
|
|
*
|
|
*
|
|
* @return boolean 타입 - true:사용, false:미사용
|
|
* @return boolean 타입 - true:사용, false:미사용
|
|
*/
|
|
*/
|
|
- public boolean Get_Shading_Use()
|
|
|
|
|
|
+ public int Get_Shading_Use()
|
|
{
|
|
{
|
|
Log.d(TAG, "Get_Shading_Use");
|
|
Log.d(TAG, "Get_Shading_Use");
|
|
- int result = GetDeviceSetted(define.DEVICE_ID_SHADING);
|
|
|
|
- if(result == DEV_DATA_ENABLE)
|
|
|
|
|
|
+// int result = GetDeviceSetted(define.DEVICE_ID_SHADING);
|
|
|
|
+// if(result == DEV_DATA_ENABLE)
|
|
|
|
+// {
|
|
|
|
+// return true;
|
|
|
|
+// }
|
|
|
|
+// else
|
|
|
|
+// {
|
|
|
|
+// return false;
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ String[] GetData = GetSettingData(define.DEVICE_ID_SHADING);
|
|
|
|
+ if (GetData == null) return 0; // 사용안함(기본값)
|
|
|
|
+
|
|
|
|
+ Log.i(TAG, "-------------------------------[Get_Shading_Use] Lnegth: " + GetData.length);
|
|
|
|
+
|
|
|
|
+ for(int i = 0; i< GetData.length; i++)
|
|
{
|
|
{
|
|
- return true;
|
|
|
|
|
|
+ Log.i(TAG, "-------------------------------[Get_Shading_Use] Data [" +i +"]" + GetData[i].toString());
|
|
}
|
|
}
|
|
- else
|
|
|
|
|
|
+ try
|
|
{
|
|
{
|
|
- return false;
|
|
|
|
|
|
+ //여기서 우선 종료를 가지고 있느닞 판단이 필요
|
|
|
|
+ //우선 종류가 있는지 부터 파악
|
|
|
|
+ //이뉴는 기존것을 대비 하기 위해 필요
|
|
|
|
+ if(GetData[1].contains("종류"))
|
|
|
|
+ {
|
|
|
|
+ //새로운 타입
|
|
|
|
+ if (GetData[1].indexOf("(전동커튼)") > 0)
|
|
|
|
+ return define.Curtain;
|
|
|
|
+ else if (GetData[1].indexOf("롤스크린") > 0)
|
|
|
|
+ return define.RollScreen;
|
|
|
|
+ else
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ //기존것
|
|
|
|
+ if (GetData[1].indexOf("사용함") > 0)
|
|
|
|
+ return define.Curtain;
|
|
|
|
+ else //1.0
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch (RuntimeException re) {
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e) {
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|