OneWMResult...Ctrl caption with position, pruefindex, clean-up, more comments, ver. 2.28.1921
This commit is contained in:
@@ -2366,6 +2366,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
static CommErr InitOrReadQ2Corrections(int threadId, IperlHead ihead, Results.Entities.WaterMeter wm, ref string resultStr)
|
||||
{
|
||||
if (ihead.CommFailed) return CommErr.CommFailed;
|
||||
if (wm.Pruefindex == 0) return CommErr.CommFailed; /// Unknown pruefindex
|
||||
|
||||
if (wm.Pruefindex == 1)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Common.Iperl;
|
||||
@@ -398,11 +400,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
: base(cfg)
|
||||
{
|
||||
iperlHeadCfg = cfg as IperlHeadCfg;
|
||||
x = new float[FeatureVectorSize];
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
x = new float[FeatureVectorSize];
|
||||
flowDirectionDetection = new FlowDirectionDetection();
|
||||
|
||||
/// Allocate memory for opto-data from iPerl
|
||||
@@ -748,20 +750,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// Select or create appropriate 'qBezeichnung'
|
||||
///
|
||||
string fullTestName = Results.Utils.GetTestName(testName, testRepeats, repetitionNr);
|
||||
string qBezeichnungOpto = null; /// To be determined from TestInfo-s (if there are any)
|
||||
foreach (var ti in testInfos)
|
||||
{
|
||||
if ((ti.PruefungsNrOpto != 0) && (ti.TestName == fullTestName))
|
||||
{
|
||||
qBezeichnungOpto = string.IsNullOrEmpty(ti.QBezeichnungOpto) ? ti.PruefungsNrOpto.ToString("D2") : ti.QBezeichnungOpto;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (qBezeichnungOpto == null)
|
||||
{
|
||||
qBezeichnungOpto = fullTestName; /// No appropriate TestInfo found => set default opto data file name
|
||||
}
|
||||
|
||||
var ti = testInfos.FirstOrDefault(x => x.PruefungsNrOpto != 0 && x.TestName == fullTestName);
|
||||
string qBezeichnung = (ti == null) ? fullTestName /// No appropriate TestInfo found => set default opto data file name
|
||||
: string.IsNullOrEmpty(ti.QBezeichnungOpto) ? ti.PruefungsNrOpto.ToString("D2")
|
||||
: ti.QBezeichnungOpto;
|
||||
///
|
||||
/// Get other required pieces of information
|
||||
///
|
||||
@@ -773,7 +765,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
///
|
||||
/// Return the file name
|
||||
///
|
||||
return string.Format("{0}_{1}_{2}_{3}.txt", pcbNr, wmPosition, qBezeichnungOpto, cycleStartTime);
|
||||
return string.Format("{0}_{1}_{2}_{3}.txt", pcbNr, wmPosition, qBezeichnung, cycleStartTime);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user