From 4687895283b9424cc0290b83e53d1088afb0b318 Mon Sep 17 00:00:00 2001
From: LYW <leeyeanwoo@diteam.co.kr>
Date: 수, 25 5월 2022 13:58:09 +0900
Subject: [PATCH] Ongoing90 #4161 CF AOI Review Offset ConfigFile BackUp 기능 추가

---
 ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp b/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
index b5f9c71..8d8d1e5 100644
--- a/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
+++ b/ReviewSystem/ReviewSystem/SequenceProcessor_CPJT.cpp
@@ -665,8 +665,12 @@
 		//	m_pSP2P->ISP2P_GetWSIControl(1)->SendWsiAfmSafePosMove();
 		//}
 		//Sleep(5000);
-		SendResultToSignalControl(PCControlSendData_ReviewResult_CPJT, SIGNAL_SEND_RESULT_SUCCESS);
-		SendSignalToSignalControl(PCControlSendSignalIndex_Seq, PCControlSend_ReviewComplete_CPJT);
+		if (GetProcessStatus() != ProcessReviewEnd_CPJT && GetProcessStatus() != ProcessReviewUnloding_CPJT)
+		{
+			SendResultToSignalControl(PCControlSendData_ReviewResult_CPJT, SIGNAL_SEND_RESULT_SUCCESS);
+			SendSignalToSignalControl(PCControlSendSignalIndex_Seq, PCControlSend_ReviewComplete_CPJT);
+		}
+
 		m_pSP2P->ISP2P_DisplayMessage(_T("[SequenceProcessor::ReviewStart] Send Review Success Signal!"));
 		//LONGREUN
 		//RecvSignalToSignalControl(PCControlRecvSignalIndex_Seq, 4);
@@ -9286,7 +9290,7 @@
 	AFM_SetAFMTracking(FALSE);
 
 	SetWsiType(0);
-	WSIAllReadySignal(0);
+	WSIAllReadySignal(1);
 	
 	// send wsi start
 	if(!WSIUserAllStartSignal())
@@ -9517,7 +9521,8 @@
 	VectorDouble vectorCollisionPosX;
 	vectorCollisionPosX.clear();
 
-
+	//WSI
+	pMotorControl->GantrySetTwoGantrySyncModeSend(1);
 
 	// WSI result count
 	for (int nModuleIdx=0; nModuleIdx<Module_GetModuleStatusCount(); nModuleIdx++)
@@ -9606,6 +9611,15 @@
 			}
 		}
 
+		if (vectorPosX.empty() == TRUE)
+		{
+			//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(0);
+			//3360 LYW_ CF AOI QD Review WSI XY MotorMoving Error END
+		}
+
 		if (m_pSP2P->ISP2P_GetReviewProcessor()->CheckMotionComplete() == FALSE)
 		{
 			g_pLog->DisplayMessage(_T("[GantryAutoGo] Motor IS Not Ready "));

--
Gitblit v1.9.3