Browse Source

DoHolePreview doesn't return when set magnification failed.

gsp 7 months ago
parent
commit
1960086262

+ 9 - 9
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -1115,12 +1115,12 @@ namespace OTSModelSharp
                 // get SEM controller to set magnification and working distance
                 if (!pSEMCtrl.SetMagnification(dMinMag))
                 {
-                    log.Error("DoHolePreview: fail to set SEM data.");
-                    pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
-                    // record end time
-                    pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
+                    log.Error("DoHolePreview: fail to set magnification.");
+                    //pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
+                    //// record end time
+                    //pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
 
-                    return;
+                    //return;
                 }
 
      
@@ -1128,11 +1128,11 @@ namespace OTSModelSharp
                 if (!SetHoleBSEParam(m_HolePreviewSample))
                 {
                     log.Error("DoHolePreview: fail to set BSE param.");
-                    pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
-                    // record end time
-                    pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
+                    //pStatus.SetStatus(OTS_MSR_SAMPLE_STATUS.FAILED);
+                    //// record end time
+                    //pStatus.ComputeTime(OTS_MSR_TIME_TYPE.STOPPED);
 
-                    return;
+                    //return;
                 }