TestMethods.Q2CorrectionFromHistory slightly modified, no State.Create() and do {} while loop, ver. 2.18.1297

This commit is contained in:
Milan Hanajik 2019-08-15 17:10:09 +02:00
parent ef5320917a
commit c3d5e157ec
3 changed files with 7 additions and 36 deletions

View File

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using NHibernate;
using NHibernate.Criterion;
using log4net;
using Results.Entities;
using TBF.UiBridge;
@ -19,36 +18,10 @@ namespace TBF.BenchControl.TestMethods.Q2CorrectionFromHistory
public IList<Event> Execute(Config.Entities.Test test, FromHistoryCfg cfg)
{
IList<Event> e;
Event retVal = Event.Done;
/// Operations
checkUiOp = new Operations.CheckUIOp(true);
//------------------------------------------------
Bridge.OnActivity(this, test.Method);
//------------------------------------------------
State.Create(string.Format("{0}({1}) : Q2 correction from history", test.Method, test.Name))
.AddOperation(checkUiOp)
.EnterState();
/// Read database here
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test));
bool success = ReadCorrectionsFromLocalDB(cfg);
{
e = StateMachine.WaitRunDevsRunOps();
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test));
if (e.Contains(Event.Error))
retVal = Event.Error;
else if (TestAndLogUiCmdStop(test, e))
retVal = Event.UiCmdStop;
}
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Completed));
return new List<Event> { retVal };
return new List<Event> { success ? Event.Done : Event.RecoverableError };
}

View File

@ -1754,17 +1754,15 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
(rdData != null) && (rdData.Length == 2) && (rdData[0] == 0) && (rdData[1] == 0))
{
error = CommErr.None;
resultStr = "Q2 correction factors reset to 0";
ihead.Q2CorrectionFactor = 0;
resultStr = string.Format("Q2 correction set to LR={0}, RL={1}", factorLR, factorRL);
break;
}
}
}
#else
if (error == CommErr.None)
if (error == CommErr.None)
{
resultStr = "Q2 corrections reset to 0";
ihead.Q2CorrRL = 0;
resultStr = string.Format("Q2 correction set to LR={0}, RL={1}", factorLR, factorRL);
}
#endif

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.1295.0")]
[assembly: AssemblyFileVersion("2.18.1295.0")]
[assembly: AssemblyVersion("2.18.1297.0")]
[assembly: AssemblyFileVersion("2.18.1297.0")]