From d0a3207e13e320aa0b333176dc3dbf66fe1d54e5 Mon Sep 17 00:00:00 2001
From: KYH <kimyonghee@diteam.co.kr>
Date: 화, 25 5월 2021 16:41:08 +0900
Subject: [PATCH] Ongoing100 #3357 C-PJT Review Align Camera 영상 초기화 기능 개선 - Loading 시 Align Camera 영상 Vector 초기화

---
 ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp |   31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp b/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
index aea1b64..74882db 100644
--- a/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
+++ b/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
@@ -48,6 +48,7 @@
 
 #define AOIRAWBIN_PATH		"\\\\126.100.100.1\\d\\DIT_ResultData\\RawBin"
 #define AOIRAWBIN_TEST_PATH		"d:\\DIT_ResultData\\RawBin"
+#define AOIRAWBIN_NETWORK_DRIVE_PATH	"Y:\\RawBin"
 
 enum CPJT_MeasureMode { CPJT_ModeAuto = 0, CPJT_ModeManual };
 // [2017:4:18]-[WEZASW] : WSI Module 장착 설비의 경우 PlanType 번호 변경.
@@ -963,7 +964,7 @@
 	//	m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::Loading] Revolver Set GoHome Success!"));
 	//}
 
-	//210330 kyh Align Image 초기화
+	//#3357 KYH Align Image 초기화 ADD START
 	CCameraControlAlign* pAlignCameraControl = m_pSP2P->ISP2P_GetAlignCameraControl();
 	if (pAlignCameraControl != NULL)
 	{
@@ -971,6 +972,7 @@
 
 		g_pLog->DisplayMessage(_T("[Align] Align Image Clear"));
 	}
+	//#3357 KYH Align Image 초기화 ADD END
 
  	// get transfer data
  	int nResultCode = 0;
@@ -2635,11 +2637,22 @@
 	{
 		CTime tmReviewLoading = CTime::GetCurrentTime();
 		CString strWild;
-		strWild.Format("%s\\%s_*.bin", strFilePath, strFileName);
+		//strWild.Format("%s\\%s_*.bin", strFilePath, strFileName);
 		CakFileUtil akFileFinder;
 		while (nReTryTime--)
 		{
-			akFileFinder.FindFile(strWild.GetBuffer(0), FALSE);
+			//#3359_LYW CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER 알람 발생 원인 분석 START
+			if (nReTryTime%2 == 0)
+			{
+				strFilePath = AOIRAWBIN_PATH;
+			}
+			else strFilePath = AOIRAWBIN_NETWORK_DRIVE_PATH;
+
+			strWild.Format("%s\\%s_*.bin", strFilePath, strFileName);
+			 akFileFinder.FindFile(strWild.GetBuffer(0), FALSE);
+			//LYW LOG추가
+			g_pLog->DisplayMessage(_T("[GlassLoading][FindRawBinFile] Find Path = %s, RetryCount = %d, ResultCode = [%d]"), strFilePath, 30-nReTryTime, GetLastError());
+			//#3359_LYW CF AOI Review REVIEW_LOADING_COMPLETE_TIMEOVER 알람 발생 원인 분석 END
 			VECFINDDATA* pFindData = akFileFinder.getFindData();
 			int nFileNamePos = strlen(akFileFinder.getProcessPath());
 			std::map<LONGLONG, CString> mapSpanFileName;
@@ -2684,6 +2697,7 @@
 					break;
 				}
 			}
+
 			akFileFinder.clear();
 			Sleep(100);
 		}
@@ -3108,7 +3122,7 @@
 					strReadData = pTransferData->strRerferData;
 					break;
 				}
-				m_pSP2P->ISP2P_DisplayMessage(_T("[ReadTransferData] Name: %s, Addr: %s, Size: %d, Data: %s"), pInfo->strName, strReadAddress, nReadSize, strReadData);
+				//m_pSP2P->ISP2P_DisplayMessage(_T("[ReadTransferData] Name: %s, Addr: %s, Size: %d, Data: %s"), pInfo->strName, strReadAddress, nReadSize, strReadData); //0517
 		}
 	}
 
@@ -4517,7 +4531,8 @@
 	strPath  = strPath + _T("\\WSI");
 	if(CreateDirectory(strPath,NULL)==FALSE)
 	{
-		g_pLog->DisplayMessage(_T("[MakeWSIUpLoadDirectory]Directory Create Fail %s "),strPath);
+		//LYW LOG추가
+		g_pLog->DisplayMessage(_T("[MakeWSIUpLoadDirectory]Directory Create Fail %s, ERROR CODE = %d "),strPath, GetLastError());
 	}
 	
 }
@@ -4673,9 +4688,11 @@
 		//보낼 포인트가 있는지 없는지 체크
 		if (vectorPosX.empty() == TRUE)
 		{
-			g_pLog->DisplayMessage(_T("[GantryAutoGo] No Exist Send Point "), vectorPosX.size());
+			//3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error 알람 발생 원인 분석 및 조치 START
+			g_pLog->DisplayMessage(_T("[GantryAutoGo] No Exist Send Point,TwoGantrySyncMode OFF!"), vectorPosX.size());
 			g_pLog->DisplayMessage(_T("[GantryAutoGo] (%d)Gantry Path Send Fail"), pModuleStatus->GetGantryIndex()); //taek 210128
-
+			pMotorControl->GantrySetTwoGantrySyncModeSend(1);
+			//3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error 알람 발생 원인 분석 및 조치 END
 		}
 		else
 		{

--
Gitblit v1.9.3