Explorar o código

set processTime =4 when do xray process in oxford spectrum.

gaoshipeng %!s(int64=3) %!d(string=hai) anos
pai
achega
56ffb9c94d

+ 7 - 1
OTSCPP/OTSControl/Oxford/OxfordWrapper/OxfordControllerWrapper.cpp

@@ -359,7 +359,7 @@ void OxfordControllerWrapper::ControllerThreadFunction()
 					break;
 				}
 			}
-			Thread::Sleep(1000);
+			Thread::Sleep(500);
 
 			m_endControllerEvent->Set();
 		}
@@ -1116,6 +1116,7 @@ bool OxfordControllerWrapper::StartXrayCollecting(const long a_nAcTimeMillisecon
 	auto edsSettings = GetEdsSpectrumSettings();
 
 	edsSettings->EdSettings->AcquisitionTime = TimeSpan::FromMilliseconds(a_nAcTimeMilliseconds);
+	edsSettings->EdSettings->ProcessTime = 4;
 
 	auto spectrum = edsController->StartAcquisition(edsSettings);
 
@@ -1147,6 +1148,8 @@ void  OxfordControllerWrapper::XraySpectrumProcess(OINA::Extender::Data::Ed::IEd
 
 		// Use the autoIdSettings to define elements that are known or elements that you want to exclude. They also list elements that cannot be identified
 		IAutoIdSettings^ autoIdSettings = ProcessingFactory::CreateAutoIdSettings();
+
+		
 		EdSpectrumProcessing->IdentifyElements(spectrum, autoIdSettings);
 
 		ISEMQuantSettings^ settings = ProcessingFactory::CreateSEMQuantSettings();
@@ -1262,6 +1265,9 @@ void OxfordControllerWrapper::OnXrayAcquisitionFinished(Object^ sender, OINA::Ex
 
 		// Use the autoIdSettings to define elements that are known or elements that you want to exclude. They also list elements that cannot be identified
 		IAutoIdSettings^ autoIdSettings = ProcessingFactory::CreateAutoIdSettings();
+		 
+		
+
 		EdSpectrumProcessing->IdentifyElements(e->Value, autoIdSettings);
 
 		ISEMQuantSettings^ settings = ProcessingFactory::CreateSEMQuantSettings();

+ 5 - 5
OTSCPP/OTSLog/COTSUtilityDllFunExport.cpp

@@ -212,12 +212,12 @@ bool SendLogMessageToNlog(LPCTSTR Msg, int postLogLevel)
 	{
 		HWND hd = GetDesktopWindow();        //得到桌面窗口
 		     hd = GetWindow(hd, GW_CHILD);        //得到屏幕上第一个子窗口
-		     char s[1000] = { 0 };
+		     char s[2000] = { 0 };
 		     int num = 1;
 		     while (hd != NULL)                    //循环得到所有的子窗口
 		     {
-		       memset(s, 0, 1000);
-		       GetWindowText(hd, s, 1000);
+		       memset(s, 0, 2000);
+		       GetWindowText(hd, s, 2000);
 			   CString winTxt(s);
 			   if (winTxt.Find(_T("OTSMeasureApp"))>-1)//find the measure app mainform
 			   {
@@ -246,9 +246,9 @@ bool SendLogMessageToNlog(LPCTSTR Msg, int postLogLevel)
 	postlog.logLevel = postLogLevel;
 	int l = msg.GetLength();
 
-	if (l > 1000)
+	if (l > 2000)
 	{
-		l = 1000;
+		l = 2000;
 	}
 	for (int i = 0; i < l; i++)
 	{

+ 1 - 1
OTSCPP/OTSLog/COTSUtilityDllFunExport.h

@@ -3,7 +3,7 @@
  struct PostLogMsg
 {
 	int logLevel;
-	char logMsg[1000];
+	char logMsg[2000];
 
 
 };

+ 1 - 1
OTSIncAMeasureApp/OTSMeasureOutputNlog.cs

@@ -14,7 +14,7 @@ namespace OTSMeasureApp
     public struct PostLogMsg
     {
         public int logLevel;//1 trace 2 debug 3info 4 warn 5 error 6 fatal
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)1000)]
+        [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)2000)]
         public char[] logMessage;
     };
   

+ 7 - 7
OTSIncAMeasureApp/Program.cs

@@ -13,13 +13,13 @@ namespace OTSMeasureApp
         static void Main()
         {
             //判断是否有授权
-            //var reg = new CRegistration();
-            //if (!reg.RegistrationVerification())
-            //{
-            //    MessageBox.Show("Error: missing authorization");
-            //    System.Environment.Exit(0);
-            //    return;
-            //}
+            var reg = new CRegistration();
+            if (!reg.RegistrationVerification())
+            {
+                MessageBox.Show("Error: missing authorization");
+                System.Environment.Exit(0);
+                return;
+            }
             //--------------------------只运行一个测量程序--------------------------------
 
             bool flag = false;