فهرست منبع

some minor adjusting

gsp 2 سال پیش
والد
کامیت
646ab5b667

+ 1 - 2
OTSCPP/OTSControl/Bruker/Bruker.API.CommonFunctions.h

@@ -715,7 +715,6 @@ namespace BrukerDll
 	/// <param name="aFileName">file name</param>
 	/// <returns>Function call sucessful or not (0 = success, otherwise error)</returns>
 	int32_t HyMapSaveMixedMapImage(uint32_t CID, char* aFileName);
-
+}
 
 	#endif //  BrukerAPICommonFunctionsH
-}

+ 1 - 1
OTSCPP/OTSControl/Bruker/Bruker.API.Esprit.cpp

@@ -199,7 +199,7 @@ namespace BrukerDll
 	bool LoadEspritAPI()
 	{
 	#ifdef _WIN64
-	   const char* csAPILibFile = "Bruker.API.Esprit64.DLL";
+	   const char* csAPILibFile = "Bruker.API.Esprit2.4.DLL";
 	#else
 	   const wchar_t* csAPILibFile = L"Bruker.API.Esprit.DLL";
 	#endif

+ 17 - 10
OTSCPP/OTSControl/Bruker/OTSBrukerImpl.cpp

@@ -541,7 +541,8 @@ namespace OTSController {
 			}
 
 			// SEM info
-			BrukerDll::PRTImageInfoEx oImageInfo=&BrukerDll::TRTImageInfoEx();
+			BrukerDll::TRTImageInfoEx imgInfo;
+			BrukerDll::PRTImageInfoEx oImageInfo=&imgInfo;
 
 			// the buffer returned is a bitmap stream, i.e. it contains the header information as well
 			int32_t nImageSize = nWidth * nHeight + 20000;
@@ -1377,9 +1378,9 @@ namespace OTSController {
 		// first attempt to open client 
 		BOOL bStartNew = FALSE;
 		BOOL bGUI = FALSE;
-		uint32_t clientId;
-		BOOL bRet = OpenClient(m_psServerName.get(), "edx", "edx", static_cast<BYTE>(bStartNew), static_cast<BYTE>(bGUI), clientId);
-		m_nClientID = clientId;
+		
+		BOOL bRet = OpenClient(m_psServerName.get(), "edx", "edx", static_cast<BYTE>(bStartNew), static_cast<BYTE>(bGUI), m_nClientID);
+		
 		if (!bRet)
 		{
 			LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::OpenClient: call OpenClient failed at the first attempt."));
@@ -1404,9 +1405,9 @@ namespace OTSController {
 			if (!bConnected)	
 			{
 				// second attempt to open client 
-				uint32_t clientId;
-				bRet = OpenClient(m_psServerName.get(), "edx", "edx", static_cast<BYTE>(bStartNew), static_cast<BYTE>(bGUI), clientId);
-				m_nClientID = clientId;
+				
+				bRet = OpenClient(m_psServerName.get(), "edx", "edx", static_cast<BYTE>(bStartNew), static_cast<BYTE>(bGUI), m_nClientID);
+			
 				if (!bRet)
 				{
 					LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::OpenClient: call OpenClient failed at the second attempt."));
@@ -2713,9 +2714,15 @@ BOOL COTSBrukerImpl::GetXRayByFeatures(CPosXraysList& a_vXPoints, std::vector<Br
 		features[i].SegmentCount = ofeature.SegmentCount;
 		if (ofeature.SegmentCount > 0)
 		{
-			features->Segments[i].XStart = ofeature.pSegment[i].XStart;
-			features->Segments[i].XCount = ofeature.pSegment[i].XCount;
-			features->Segments[i].Y = ofeature.pSegment[i].Y;
+			int segCount = features[i].SegmentCount;
+			auto ofeature = a_vFeatures[i];
+			features->Segments = new BrukerDll::TSegment[segCount];
+			for (int j = 0; j < segCount; j++)
+			{
+				features->Segments[j].XStart = ofeature.pSegment[j].XStart;
+				features->Segments[j].XCount = ofeature.pSegment[j].XCount;
+				features->Segments[j].Y = ofeature.pSegment[j].Y;
+			}
 
 			// calculate pixel time
 			int nPixelCount = 0;