|
@@ -224,10 +224,13 @@ public class Ventilation_Controller extends DeviceManager {
|
|
|
}
|
|
|
|
|
|
private int mModelType = Version.MODEL_TYPE.OTHER;
|
|
|
- private static int mVentilInfo = WallpadDeviceSet.VENTIL_TYPE_NORMAL;
|
|
|
+ private static int mVentilInfo = WallpadDeviceSet.VENTIL_TYPE_NORMAL_OLD;
|
|
|
/** 예약운전 지원 여부 */
|
|
|
private boolean mReservationSupport = false;
|
|
|
- private int VersionRetryCount = 0;
|
|
|
+ //2022.10.11 jglee - 대체품 환기 기존것도 호환되게 하기위해
|
|
|
+ //설정으로 현재환기 인지 예전 환기인지 확인 하는 것 넣음(설정)
|
|
|
+ //private int VersionRetryCount = 0;
|
|
|
+ private boolean mbisOldVentilation = false;
|
|
|
|
|
|
public class Driver {
|
|
|
private PollingList Polling;
|
|
@@ -262,7 +265,6 @@ public class Ventilation_Controller extends DeviceManager {
|
|
|
public byte Status;
|
|
|
public int SearchTryCount;
|
|
|
public long lHDCAutoAirCleanCheckTimeTick;
|
|
|
- public long lHDCVersionInfoCheckTimeTick;
|
|
|
|
|
|
private PollingList() {
|
|
|
Status = STATUS.First;
|
|
@@ -312,6 +314,9 @@ public class Ventilation_Controller extends DeviceManager {
|
|
|
|
|
|
/* 환기 타입 가져오기 */
|
|
|
mVentilInfo = GetVentilInfo();
|
|
|
+ //jglee - 2022.10.11
|
|
|
+ //여기서 초기버전(상태정보 곧바로 가져오는 버전인지 확인 필요
|
|
|
+ if(mVentilInfo == WallpadDeviceSet.VENTIL_TYPE_NORMAL_OLD) mbisOldVentilation = true;
|
|
|
|
|
|
/* 환기가 후드일 경우 ID 교체 */
|
|
|
if (mVentilInfo == WallpadDeviceSet.VENTIL_TYPE_HOOD) DEVICE_ADDRESS = (byte)0x68;
|
|
@@ -376,41 +381,38 @@ public class Ventilation_Controller extends DeviceManager {
|
|
|
}
|
|
|
Sleep(100);
|
|
|
|
|
|
- VERSION Version = Send_GetVersion();
|
|
|
- if (Version != null) {
|
|
|
- // 지원 상태를 저장한다.
|
|
|
- mDriver.Status.Support = new DataClasses.Venti.SUPPORT(Version.Support);
|
|
|
- mDriver.Version = Version;
|
|
|
- Log.i(TAG, mDriver.Version.ToDebugString());
|
|
|
-
|
|
|
- // 룸콘트롤러가 없을 경우 DB에 저장된 값이 예약상태이다.
|
|
|
- if (!mDriver.Status.Support.RoomController) {
|
|
|
- mDriver.Status.Reservation = DB_GetVentiReserveOnOff();
|
|
|
- }
|
|
|
-
|
|
|
- // 상태를 가져온다.
|
|
|
- Sleep(150);
|
|
|
+ VERSION Version;
|
|
|
+ if(mbisOldVentilation)
|
|
|
+ {
|
|
|
DataClasses.Venti Status = Send_GetStatus();
|
|
|
if (Status != null) {
|
|
|
- UpdateVariables(Status);
|
|
|
+ mDriver.Polling.SetStatus(Driver.PollingList.STATUS.Normal);
|
|
|
}
|
|
|
- mDriver.Polling.SetStatus(Driver.PollingList.STATUS.Normal);
|
|
|
- VersionRetryCount = 0;
|
|
|
}
|
|
|
-
|
|
|
- Version = null;
|
|
|
-
|
|
|
- // 2세대 처음 들어간 곳 중에, 버전 정보를 물어보지 않는곳이 발생하여 10번 물어본 후 응답이 없으면 환기 상태를 노멀로 확인
|
|
|
- if(Version == null)
|
|
|
+ else
|
|
|
{
|
|
|
- VersionRetryCount ++;
|
|
|
- }
|
|
|
+ Version = Send_GetVersion();
|
|
|
+ if (Version != null) {
|
|
|
+ // 지원 상태를 저장한다.
|
|
|
+ mDriver.Status.Support = new DataClasses.Venti.SUPPORT(Version.Support);
|
|
|
+ mDriver.Version = Version;
|
|
|
+ Log.i(TAG, mDriver.Version.ToDebugString());
|
|
|
+
|
|
|
+ // 룸콘트롤러가 없을 경우 DB에 저장된 값이 예약상태이다.
|
|
|
+ if (!mDriver.Status.Support.RoomController) {
|
|
|
+ mDriver.Status.Reservation = DB_GetVentiReserveOnOff();
|
|
|
+ }
|
|
|
|
|
|
- if(VersionRetryCount == 5)
|
|
|
- {
|
|
|
- VersionRetryCount = 0;
|
|
|
- mDriver.Polling.SetStatus(Driver.PollingList.STATUS.Normal);
|
|
|
+ // 상태를 가져온다.
|
|
|
+ Sleep(150);
|
|
|
+ DataClasses.Venti Status = Send_GetStatus();
|
|
|
+ if (Status != null) {
|
|
|
+ UpdateVariables(Status);
|
|
|
+ }
|
|
|
+ mDriver.Polling.SetStatus(Driver.PollingList.STATUS.Normal);
|
|
|
+ }
|
|
|
}
|
|
|
+ Version = null;
|
|
|
}
|
|
|
/* [[ Normal ]]
|
|
|
* 평상시 */
|
|
@@ -426,15 +428,6 @@ public class Ventilation_Controller extends DeviceManager {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 2세대 처음 들어간 곳 중에, 버전 정보를 물어보지 않는곳이 발생하여, 1시간 주기로 확인
|
|
|
- long currentTimeMillis = 0;
|
|
|
- currentTimeMillis = System.currentTimeMillis();
|
|
|
- if (Math.abs(currentTimeMillis - mDriver.Polling.lHDCVersionInfoCheckTimeTick) > lHDCVERSIONINFO_CHECK_TIME_TICK) {
|
|
|
- CheckVersion();
|
|
|
- mDriver.Polling.lHDCVersionInfoCheckTimeTick = currentTimeMillis;
|
|
|
- Sleep(100);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
// 환기 예약 기능 관련
|
|
|
ReservationAction(false);
|
|
@@ -2306,7 +2299,7 @@ public class Ventilation_Controller extends DeviceManager {
|
|
|
* @return (int) 환기종류
|
|
|
*/
|
|
|
private int GetVentilInfo() {
|
|
|
- int retVentilInfo = WallpadDeviceSet.VENTIL_TYPE_NORMAL;
|
|
|
+ int retVentilInfo = WallpadDeviceSet.VENTIL_TYPE_NORMAL_OLD;
|
|
|
try {
|
|
|
WallpadDeviceSet devset = new WallpadDeviceSet(ServiceMain.svcContext);
|
|
|
int[] setdata = devset.Get_Ventil_Info();
|