Progress bar fixed for Pressure and Leak test.
This commit is contained in:
@@ -37,6 +37,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
|
||||
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
|
||||
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 1, 30, Convert.ToInt32(test.TstTime) + 15, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.JustStarted));
|
||||
|
||||
// Transition or SetRoute - Start
|
||||
switch (Transition(transitionBefore, TransitionContext.BeforeTest))
|
||||
@@ -45,6 +47,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
}
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionBefore));
|
||||
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, 1, inPath, benchPath, outPath, sensPath, 0));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, 1);
|
||||
@@ -72,7 +76,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Setting_the_water_pressure);
|
||||
//------------------------------------------------
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.FlowSetting));
|
||||
//------------------------------------------------
|
||||
|
||||
float pumpPower = test.PumpPower;
|
||||
int startTime = StateMachine.Time;
|
||||
@@ -132,8 +137,9 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Test_in_progress);
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test));
|
||||
//------------------------------------------------
|
||||
State.Create("PMaxTest : Starting the test")
|
||||
State.Create("PMaxTest : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn))
|
||||
.AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut))
|
||||
@@ -297,7 +303,9 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
|
||||
stopTest:
|
||||
|
||||
///
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionAfter));
|
||||
|
||||
///
|
||||
/// Quit this sequence
|
||||
///
|
||||
State.Create("PMaxTest : Stopping diverter, gate, etc.")
|
||||
@@ -311,7 +319,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
}
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
|
||||
/// Transition sequence at the end of test
|
||||
/// Transition sequence at the end of test
|
||||
/// Prevent overwriting 'retVal' in case it was set to non-default value earlier
|
||||
switch (Transition(transitionAfter, (retVal == Event.Done) ? TransitionContext.AfterTest : TransitionContext.Stop))
|
||||
{
|
||||
@@ -319,6 +327,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
case Event.UiCmdStop: { if (retVal == Event.Done) retVal = Event.UiCmdStop; break; }
|
||||
}
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Completed));
|
||||
|
||||
/// Create a list with one item 'retVal' (default is Event.Done) and return it
|
||||
IList<Event> retList = new List<Event>(1);
|
||||
retList.Add(retVal);
|
||||
|
||||
Reference in New Issue
Block a user