From 04547306d069bc9f8d2951013251cc161f9a4389 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 2 May 2019 14:19:01 +0200 Subject: [PATCH] Bug fix : Purging sequence is executed after cycle selection after a STOP in the previous evacuation sequence, ver. 2.18.1207 --- TBF/BenchControl/Sequences/MainSeq.cs | 27 ++++++++++--------- .../iPerlCommunication/iPerlHead/IperlHead.cs | 10 +++---- TBF/Properties/AssemblyInfo.cs | 4 +-- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/TBF/BenchControl/Sequences/MainSeq.cs b/TBF/BenchControl/Sequences/MainSeq.cs index bf949b1a9..ff29fe1e0 100644 --- a/TBF/BenchControl/Sequences/MainSeq.cs +++ b/TBF/BenchControl/Sequences/MainSeq.cs @@ -1243,7 +1243,7 @@ namespace TBF.BenchControl.Sequences ProcessData.BatchRslts.Batch.RsltsSent = resultsSent; /// - /// Save results to the built in 'Results' database + /// Save results to 'Results' MySQL database /// Results.DB.SaveNewBatch(ProcessData.BatchRslts.Batch); @@ -1268,17 +1268,15 @@ namespace TBF.BenchControl.Sequences /// Evacuation is similar to 'Abort session' (no results are saved), but the evacuation is done as well. StateMachine.ControlBoard.ManualUIAllowed = true; + Event evacRetv = DoEvacuation(purgeEnd); + Bridge.OnProcedureCompleted(this, new ProcedureCompletedEventArgs(StateMachine.Procedure)); - switch (DoEvacuation(purgeEnd)) + switch (evacRetv) { - case Event.Error: goto error; - case Event.UiCmdStop: goto stop; - default: break; + case Event.Error: goto error; + case Event.UiCmdStop: goto stop; + default: goto select_procedure; } - - Bridge.OnProcedureCompleted(this, new ProcedureCompletedEventArgs(StateMachine.Procedure)); - - goto select_procedure; stop_within_cycle: @@ -1891,15 +1889,19 @@ namespace TBF.BenchControl.Sequences } //-------------------------------------------------------- - switch (Transition(purgeEnd, TransitionContext.PurgeEnd)) + benchFilled = false; /// because evacuation sequence started + /// + switch (Transition(purgeEnd, TransitionContext.PurgeEnd)) { case Event.Error: if (simultWithEvacuationCount > 0) CloseIPerlCommForm(); return Event.Error; - case Event.UiCmdStop: + + case Event.UiCmdStop: if (simultWithEvacuationCount > 0) CloseIPerlCommForm(); return Event.UiCmdStop; - default: + + default: break; } @@ -1932,7 +1934,6 @@ namespace TBF.BenchControl.Sequences modelessDlg = null; } - benchFilled = false; Bridge.Bench2UI(ButtonsEtc.ShowBenchEmpty); return Event.Done; diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs index 0cb901054..cb94a6245 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs @@ -380,11 +380,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead public void Initialize() { ClearData(); + optoSerialPortParsingEnabled = false; if (DebugLevel == DebugMode.Normal) { - optoSerialPortParsingEnabled = false; - /// Allocate memory for opto-data from iPerl optoData = new OptoTelegramRaw[MaxOptoDataCount]; for (int i = 0; i < MaxOptoDataCount; i++) optoData[i] = new OptoTelegramRaw(); @@ -471,10 +470,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead { try { - if (optoSerialPortParsingEnabled) - ReadOptoData(OptoState.Read); - else - ReadOptoData(OptoState.Flush); + ReadOptoData(optoSerialPortParsingEnabled ? OptoState.Read : OptoState.Flush); } catch (Exception e) { @@ -556,7 +552,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead TestEndTelegramIx = 0; /// File name is: PCB_AA_BB_HH_MI_SS..txt - string wmPosition = Name.Substring(5); + string wmPosition = Name.Substring(5); /// WMPosition is extracted from a component name in form 'iPerl#' if (wmPosition.Length == 1) wmPosition = "0" + wmPosition; SensusTestInfo[] testInfos = Sequences.ProcessData.CompleteTestInfos; diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index b6a94d658..109b67829 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.1206.0")] -[assembly: AssemblyFileVersion("2.18.1206.0")] +[assembly: AssemblyVersion("2.18.1207.0")] +[assembly: AssemblyFileVersion("2.18.1207.0")]