Introduction of Program.CompoundWMsCount, fix in DataEntry.Combined.CycleBeginningForm, version 1.5.68.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3 };
|
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3 };
|
||||||
enabledComboBoxes = new List<ComboBox>();
|
enabledComboBoxes = new List<ComboBox>();
|
||||||
|
|
||||||
this.WaterMetersCount = Program.WMsCount / 2; /// Default number of compound water meters
|
this.WaterMetersCount = Program.CompoundWMsCount; /// Default number of compound water meters
|
||||||
|
|
||||||
completed = false;
|
completed = false;
|
||||||
StartForceCloseHandler();
|
StartForceCloseHandler();
|
||||||
@@ -63,7 +63,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
public CycleBeginningForm(int compoundWaterMetersCount)
|
public CycleBeginningForm(int compoundWaterMetersCount)
|
||||||
: this()
|
: this()
|
||||||
{
|
{
|
||||||
this.WaterMetersCount = compoundWaterMetersCount; /// = Program.WMsCount / 2
|
this.WaterMetersCount = compoundWaterMetersCount; /// = Program.CompondWMsCount
|
||||||
MainSNText = new string[compoundWaterMetersCount];
|
MainSNText = new string[compoundWaterMetersCount];
|
||||||
AuxSNText = new string[compoundWaterMetersCount];
|
AuxSNText = new string[compoundWaterMetersCount];
|
||||||
Disabled = new bool[compoundWaterMetersCount];
|
Disabled = new bool[compoundWaterMetersCount];
|
||||||
@@ -93,20 +93,22 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
if (WaterMetersCount >= 2) groupBox2.Visible = true;
|
if (WaterMetersCount >= 2) groupBox2.Visible = true;
|
||||||
if (WaterMetersCount >= 3) groupBox3.Visible = true;
|
if (WaterMetersCount >= 3) groupBox3.Visible = true;
|
||||||
|
|
||||||
if (Program.LocalSettings.LastMainSNTextsCount == TextBoxesCount &&
|
for (int i = 0; i < TextBoxesCount; i++)
|
||||||
Program.LocalSettings.LastAuxSNTextsCount == TextBoxesCount)
|
|
||||||
{
|
{
|
||||||
for (int i = 0; i < TextBoxesCount; i++)
|
mainLabels[i].Visible = mainComboBoxes[i].Visible = true;
|
||||||
|
auxLabels[i].Visible = auxComboBoxes[i].Visible = true;
|
||||||
|
checkBoxes[i].Visible = true;
|
||||||
|
enabledComboBoxes.Add(mainComboBoxes[i]);
|
||||||
|
enabledComboBoxes.Add(auxComboBoxes[i]);
|
||||||
|
|
||||||
|
if (Program.LocalSettings.LastMainSNTextsCount == TextBoxesCount &&
|
||||||
|
Program.LocalSettings.LastAuxSNTextsCount == TextBoxesCount)
|
||||||
{
|
{
|
||||||
mainComboBoxes[i].Items.Add(Program.LocalSettings.LastMainSNTexts[i]);
|
mainComboBoxes[i].Items.Add(Program.LocalSettings.LastMainSNTexts[i]);
|
||||||
auxComboBoxes[i].Items.Add(Program.LocalSettings.LastAuxSNTexts[i]);
|
auxComboBoxes[i].Items.Add(Program.LocalSettings.LastAuxSNTexts[i]);
|
||||||
mainLabels[i].Visible = mainComboBoxes[i].Visible = true;
|
|
||||||
auxLabels[i].Visible = auxComboBoxes[i].Visible = true;
|
|
||||||
checkBoxes[i].Visible = true;
|
|
||||||
enabledComboBoxes.Add(mainComboBoxes[i]);
|
|
||||||
enabledComboBoxes.Add(auxComboBoxes[i]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Localize()
|
void Localize()
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
MainStateText = new string[Program.WMsCount / 2];
|
MainStateText = new string[Program.CompoundWMsCount];
|
||||||
AuxStateText = new string[Program.WMsCount / 2];
|
AuxStateText = new string[Program.CompoundWMsCount];
|
||||||
QRise = new float[Program.WMsCount / 2];
|
QRise = new float[Program.CompoundWMsCount];
|
||||||
QFall = new float[Program.WMsCount / 2];
|
QFall = new float[Program.CompoundWMsCount];
|
||||||
completed = false;
|
completed = false;
|
||||||
StartForceCloseHandler();
|
StartForceCloseHandler();
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||||
qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 2)
|
if (Program.CompoundWMsCount >= 2)
|
||||||
{
|
{
|
||||||
qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||||
qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||||
@@ -87,7 +87,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
Height = 305;
|
Height = 305;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 3)
|
if (Program.CompoundWMsCount >= 3)
|
||||||
{
|
{
|
||||||
qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||||
qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||||
@@ -108,7 +108,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; }
|
if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; }
|
||||||
if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; }
|
if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; }
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 2)
|
if (Program.CompoundWMsCount >= 2)
|
||||||
{
|
{
|
||||||
MainStateText[1] = mainState2TextBox.Text;
|
MainStateText[1] = mainState2TextBox.Text;
|
||||||
AuxStateText[1] = auxState2TextBox.Text;
|
AuxStateText[1] = auxState2TextBox.Text;
|
||||||
@@ -116,7 +116,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; }
|
if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 3)
|
if (Program.CompoundWMsCount >= 3)
|
||||||
{
|
{
|
||||||
MainStateText[2] = mainState3TextBox.Text;
|
MainStateText[2] = mainState3TextBox.Text;
|
||||||
AuxStateText[2] = auxState3TextBox.Text;
|
AuxStateText[2] = auxState3TextBox.Text;
|
||||||
|
|||||||
@@ -69,12 +69,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
public EntryForm(EntryFormCfg cfg)
|
public EntryForm(EntryFormCfg cfg)
|
||||||
: base(cfg)
|
: base(cfg)
|
||||||
{
|
{
|
||||||
serialNr = new string[Program.WMsCount / 2 * 2];
|
serialNr = new string[Program.CompoundWMsCount * 2];
|
||||||
disabled = new bool[Program.WMsCount / 2];
|
disabled = new bool[Program.CompoundWMsCount];
|
||||||
wmStartState = new float[Program.WMsCount / 2 * 2];
|
wmStartState = new float[Program.CompoundWMsCount * 2];
|
||||||
wmStartStateStr = new string[Program.WMsCount / 2 * 2];
|
wmStartStateStr = new string[Program.CompoundWMsCount * 2];
|
||||||
wmEndState = new float[Program.WMsCount / 2 * 2];
|
wmEndState = new float[Program.CompoundWMsCount * 2];
|
||||||
wmCycleEndState = new string[Program.WMsCount / 2 * 2];
|
wmCycleEndState = new string[Program.CompoundWMsCount * 2];
|
||||||
|
|
||||||
entryFormCfg = cfg;
|
entryFormCfg = cfg;
|
||||||
currentOp = CurrentOp.None;
|
currentOp = CurrentOp.None;
|
||||||
@@ -122,7 +122,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
///
|
///
|
||||||
void OpenBeginningDlg(EntryForm myRef)
|
void OpenBeginningDlg(EntryForm myRef)
|
||||||
{
|
{
|
||||||
myRef.modelessDlg = new CycleBeginningForm(Program.WMsCount / 2);
|
myRef.modelessDlg = new CycleBeginningForm(Program.CompoundWMsCount);
|
||||||
modelessDlg.Show();
|
modelessDlg.Show();
|
||||||
}
|
}
|
||||||
///
|
///
|
||||||
@@ -135,20 +135,20 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
///
|
///
|
||||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||||
{
|
{
|
||||||
myRef.modelessDlg = new TestStartEndForm(Program.WMsCount / 2, disabled);
|
myRef.modelessDlg = new TestStartEndForm(Program.CompoundWMsCount, disabled);
|
||||||
modelessDlg.Show();
|
modelessDlg.Show();
|
||||||
}
|
}
|
||||||
///
|
///
|
||||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||||
{
|
{
|
||||||
string[] mainStartSateStr = new string[Program.WMsCount / 2];
|
string[] mainStartSateStr = new string[Program.CompoundWMsCount];
|
||||||
string[] auxStartSateStr = new string[Program.WMsCount / 2];
|
string[] auxStartSateStr = new string[Program.CompoundWMsCount];
|
||||||
for (int i = 0; i < Program.WMsCount / 2; i++)
|
for (int i = 0; i < Program.CompoundWMsCount; i++)
|
||||||
{
|
{
|
||||||
mainStartSateStr[i] = wmStartStateStr[2 * i];
|
mainStartSateStr[i] = wmStartStateStr[2 * i];
|
||||||
auxStartSateStr[i] = wmStartStateStr[2 * i + 1];
|
auxStartSateStr[i] = wmStartStateStr[2 * i + 1];
|
||||||
}
|
}
|
||||||
myRef.modelessDlg = new TestStartEndForm(Program.WMsCount / 2, mainStartSateStr, auxStartSateStr, disabled, refVolume, errLimLo, errLimHi);
|
myRef.modelessDlg = new TestStartEndForm(Program.CompoundWMsCount, mainStartSateStr, auxStartSateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||||
modelessDlg.Show();
|
modelessDlg.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,9 +132,9 @@ namespace TBF.BenchControl.DataEntry.Combined
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShuffleTextBoxes()
|
void ShuffleTextBoxes()
|
||||||
{
|
{
|
||||||
if (Program.WMsCount / 2 < TextBoxesCount)
|
if (Program.CompoundWMsCount < TextBoxesCount)
|
||||||
{
|
{
|
||||||
TextBoxesCount = Program.WMsCount / 2;
|
TextBoxesCount = Program.CompoundWMsCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ namespace TBF.BenchControl.DataEntry.Munich
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
MainSNText = new string[Program.WMsCount / 2];
|
MainSNText = new string[Program.CompoundWMsCount];
|
||||||
AuxSNText = new string[Program.WMsCount / 2];
|
AuxSNText = new string[Program.CompoundWMsCount];
|
||||||
completed = false;
|
completed = false;
|
||||||
StartForceCloseHandler();
|
StartForceCloseHandler();
|
||||||
|
|
||||||
if (Program.WMsCount / 2 < 2) Height = 200;
|
if (Program.CompoundWMsCount < 2) Height = 200;
|
||||||
else if (Program.WMsCount / 2 < 3) Height = 355;
|
else if (Program.CompoundWMsCount < 3) Height = 355;
|
||||||
|
|
||||||
Localize();
|
Localize();
|
||||||
}
|
}
|
||||||
@@ -57,13 +57,13 @@ namespace TBF.BenchControl.DataEntry.Munich
|
|||||||
MainSNText[0] = mainSN1TextBox.Text;
|
MainSNText[0] = mainSN1TextBox.Text;
|
||||||
AuxSNText[0] = auxSN1TextBox.Text;
|
AuxSNText[0] = auxSN1TextBox.Text;
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 2)
|
if (Program.CompoundWMsCount >= 2)
|
||||||
{
|
{
|
||||||
MainSNText[1] = mainSN2TextBox.Text;
|
MainSNText[1] = mainSN2TextBox.Text;
|
||||||
AuxSNText[1] = auxSN2TextBox.Text;
|
AuxSNText[1] = auxSN2TextBox.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 3)
|
if (Program.CompoundWMsCount >= 3)
|
||||||
{
|
{
|
||||||
MainSNText[2] = mainSN3TextBox.Text;
|
MainSNText[2] = mainSN3TextBox.Text;
|
||||||
AuxSNText[2] = auxSN3TextBox.Text;
|
AuxSNText[2] = auxSN3TextBox.Text;
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ namespace TBF.BenchControl.DataEntry.Munich
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
MainStateText = new string[Program.WMsCount / 2];
|
MainStateText = new string[Program.CompoundWMsCount];
|
||||||
AuxStateText = new string[Program.WMsCount / 2];
|
AuxStateText = new string[Program.CompoundWMsCount];
|
||||||
QRise = new float[Program.WMsCount / 2];
|
QRise = new float[Program.CompoundWMsCount];
|
||||||
QFall = new float[Program.WMsCount / 2];
|
QFall = new float[Program.CompoundWMsCount];
|
||||||
completed = false;
|
completed = false;
|
||||||
StartForceCloseHandler();
|
StartForceCloseHandler();
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
|||||||
qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||||
qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 2)
|
if (Program.CompoundWMsCount >= 2)
|
||||||
{
|
{
|
||||||
qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||||
qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||||
@@ -87,7 +87,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
|||||||
Height = 305;
|
Height = 305;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 3)
|
if (Program.CompoundWMsCount >= 3)
|
||||||
{
|
{
|
||||||
qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||||
qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||||
@@ -108,7 +108,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
|||||||
if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; }
|
if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; }
|
||||||
if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; }
|
if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; }
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 2)
|
if (Program.CompoundWMsCount >= 2)
|
||||||
{
|
{
|
||||||
MainStateText[1] = mainState2TextBox.Text;
|
MainStateText[1] = mainState2TextBox.Text;
|
||||||
AuxStateText[1] = auxState2TextBox.Text;
|
AuxStateText[1] = auxState2TextBox.Text;
|
||||||
@@ -116,7 +116,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
|||||||
if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; }
|
if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Program.WMsCount / 2 >= 3)
|
if (Program.CompoundWMsCount >= 3)
|
||||||
{
|
{
|
||||||
MainStateText[2] = mainState3TextBox.Text;
|
MainStateText[2] = mainState3TextBox.Text;
|
||||||
AuxStateText[2] = auxState3TextBox.Text;
|
AuxStateText[2] = auxState3TextBox.Text;
|
||||||
|
|||||||
@@ -174,9 +174,9 @@ namespace TBF.BenchControl.ResultsPrinters.Basic
|
|||||||
|
|
||||||
if (combined)
|
if (combined)
|
||||||
{
|
{
|
||||||
for (int wmNr = 1; wmNr <= Program.WMsCount / 2; wmNr++) /// wmNr is 1-based
|
for (int wmNr = 0; wmNr < Program.CompoundWMsCount; wmNr++) /// wmNr is 0-based
|
||||||
{
|
{
|
||||||
nextWmTop += PrintCombinedWM(e, wmNr, nextWmTop);
|
nextWmTop += PrintCombinedWM(e, wmNr + 1, nextWmTop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ namespace TBF.BenchControl.ResultsWriters.Basic
|
|||||||
///--------
|
///--------
|
||||||
if (combined)
|
if (combined)
|
||||||
{
|
{
|
||||||
for (int wmNr = 1; wmNr <= Program.WMsCount / 2; wmNr++) WriteCombinedWM(wmNr); /// wmNr is 1-based
|
for (int wmNr = 0; wmNr < Program.CompoundWMsCount; wmNr++) WriteCombinedWM(wmNr + 1); /// wmNr is 0-based
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
|||||||
|
|
||||||
string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq,
|
string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq,
|
||||||
cBrd.ReferenceFlow * outPath.FlowMeter.NominalFlow);
|
cBrd.ReferenceFlow * outPath.FlowMeter.NominalFlow);
|
||||||
for (int i = 0; i < (Program.WMsCount / 2) * 2; i++)
|
for (int i = 0; i < Program.CompoundWMsCount * 2; i++)
|
||||||
{
|
{
|
||||||
logstr += string.Format(" M{0}=({1},{2})", i + 1, WMRefPulses[i], WMPulses[i]);
|
logstr += string.Format(" M{0}=({1},{2})", i + 1, WMRefPulses[i], WMPulses[i]);
|
||||||
}
|
}
|
||||||
@@ -300,7 +300,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
|||||||
|
|
||||||
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
|
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
|
||||||
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress);
|
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress);
|
||||||
for (int i = 0; i < Program.WMsCount / 2; i++)
|
for (int i = 0; i < Program.CompoundWMsCount; i++)
|
||||||
{
|
{
|
||||||
data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter
|
data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter
|
||||||
+ data.TestResult.Meters[2 * i + 1].VolumeMeter;
|
+ data.TestResult.Meters[2 * i + 1].VolumeMeter;
|
||||||
@@ -415,7 +415,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
|||||||
tstRslt.TimeDivEnd4 = 0;
|
tstRslt.TimeDivEnd4 = 0;
|
||||||
tstRslt.TimeDivEnd5 = 0;
|
tstRslt.TimeDivEnd5 = 0;
|
||||||
|
|
||||||
for (int iCmbnd = 0; iCmbnd < Program.WMsCount / 2; iCmbnd++)
|
for (int iCmbnd = 0; iCmbnd < Program.CompoundWMsCount; iCmbnd++)
|
||||||
{
|
{
|
||||||
tstRslt.CombinedMeters[iCmbnd].VolumeRef = tstRslt.VolumeCTV; /// [l] must be calculated before main & aux. meter error
|
tstRslt.CombinedMeters[iCmbnd].VolumeRef = tstRslt.VolumeCTV; /// [l] must be calculated before main & aux. meter error
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -20,9 +20,9 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
|||||||
|
|
||||||
public IList<Event> Execute(Entities.Test test, CombinedWithDetTestParams testParams)
|
public IList<Event> Execute(Entities.Test test, CombinedWithDetTestParams testParams)
|
||||||
{
|
{
|
||||||
if (test.Part < 1 || test.Part > (Program.WMsCount / 2))
|
if (test.Part < 1 || test.Part > Program.CompoundWMsCount)
|
||||||
{
|
{
|
||||||
UiBridge.Bridge.OnError(this, string.Format("Test 'Part' should be 1 .. {0}", Program.WMsCount / 2));
|
UiBridge.Bridge.OnError(this, string.Format("Test 'Part' should be 1 .. {0}", Program.CompoundWMsCount));
|
||||||
IList<Event> retval = new List<Event>(1);
|
IList<Event> retval = new List<Event>(1);
|
||||||
retval.Add(Event.ConfigurationError);
|
retval.Add(Event.ConfigurationError);
|
||||||
return retval;
|
return retval;
|
||||||
@@ -31,7 +31,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
|||||||
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;
|
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;
|
||||||
|
|
||||||
/// Specific for combined meters
|
/// Specific for combined meters
|
||||||
int[] lastWMPulses = new int[Program.WMsCount];
|
int[] lastWMPulses = new int[2 * Program.CompoundWMsCount];
|
||||||
|
|
||||||
IList<Event> e = new List<Event>(); /// Events from currently running operations
|
IList<Event> e = new List<Event>(); /// Events from currently running operations
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
|||||||
while (!e.Contains(Event.PositionReached));
|
while (!e.Contains(Event.PositionReached));
|
||||||
|
|
||||||
// Last pulses are kept to calculate differences
|
// Last pulses are kept to calculate differences
|
||||||
for (int i = 0; i < Program.WMsCount; i++) lastWMPulses[i] = WMPulses[i];
|
for (int i = 0; i < 2 * Program.CompoundWMsCount; i++) lastWMPulses[i] = WMPulses[i];
|
||||||
|
|
||||||
// Shift data in the detection buffers
|
// Shift data in the detection buffers
|
||||||
for (int i = DetectionBufferSize - 2; i >= 0; i--)
|
for (int i = DetectionBufferSize - 2; i >= 0; i--)
|
||||||
@@ -466,7 +466,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
|||||||
|
|
||||||
string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq,
|
string logstr = string.Format("E={0} f={1} q={2}", cBrd.EtPulses(0), cBrd.ReferenceFreq,
|
||||||
cBrd.ReferenceFlow * outPath.FlowMeter.NominalFlow);
|
cBrd.ReferenceFlow * outPath.FlowMeter.NominalFlow);
|
||||||
for (int i = 0; i < (Program.WMsCount / 2) * 2; i++)
|
for (int i = 0; i < Program.CompoundWMsCount * 2; i++)
|
||||||
{
|
{
|
||||||
logstr += string.Format(" M{0}=({1},{2})", i + 1, WMRefPulses[i], WMPulses[i]);
|
logstr += string.Format(" M{0}=({1},{2})", i + 1, WMRefPulses[i], WMPulses[i]);
|
||||||
}
|
}
|
||||||
@@ -475,7 +475,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
|||||||
|
|
||||||
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
|
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
|
||||||
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress);
|
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress);
|
||||||
for (int i = 0; i < Program.WMsCount / 2; i++)
|
for (int i = 0; i < Program.CompoundWMsCount; i++)
|
||||||
{
|
{
|
||||||
data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter
|
data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter
|
||||||
+ data.TestResult.Meters[2 * i + 1].VolumeMeter;
|
+ data.TestResult.Meters[2 * i + 1].VolumeMeter;
|
||||||
@@ -595,7 +595,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
|||||||
tstRslt.TimeDivEnd4 = 0;
|
tstRslt.TimeDivEnd4 = 0;
|
||||||
tstRslt.TimeDivEnd5 = 0;
|
tstRslt.TimeDivEnd5 = 0;
|
||||||
|
|
||||||
for (int iCmbnd = 0; iCmbnd < Program.WMsCount / 2; iCmbnd++)
|
for (int iCmbnd = 0; iCmbnd < Program.CompoundWMsCount; iCmbnd++)
|
||||||
{
|
{
|
||||||
for (int i = 2 * iCmbnd; i < 2 * iCmbnd + 2; i++)
|
for (int i = 2 * iCmbnd; i < 2 * iCmbnd + 2; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-3
@@ -369,7 +369,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters
|
|||||||
|
|
||||||
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
|
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
|
||||||
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress);
|
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress);
|
||||||
for (int i = 0; i < Program.WMsCount / 2; i++)
|
for (int i = 0; i < Program.CompoundWMsCount; i++)
|
||||||
{
|
{
|
||||||
data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter
|
data.TestResult.CombinedMeters[i].VolumeMeter = data.TestResult.Meters[2 * i].VolumeMeter
|
||||||
+ data.TestResult.Meters[2 * i + 1].VolumeMeter;
|
+ data.TestResult.Meters[2 * i + 1].VolumeMeter;
|
||||||
@@ -486,7 +486,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters
|
|||||||
while (!e.Contains(Event.ModelessFormClosed));
|
while (!e.Contains(Event.ModelessFormClosed));
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < Program.WMsCount / 2 * 2; i++)
|
for (int i = 0; i < Program.CompoundWMsCount * 2; i++)
|
||||||
{
|
{
|
||||||
tstRslt.Meters[i].VolumeEnd = dataEntryCmpnt.WMEndState(i);
|
tstRslt.Meters[i].VolumeEnd = dataEntryCmpnt.WMEndState(i);
|
||||||
|
|
||||||
@@ -547,7 +547,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters
|
|||||||
tstRslt.TimeDivEnd4 = 0;
|
tstRslt.TimeDivEnd4 = 0;
|
||||||
tstRslt.TimeDivEnd5 = 0;
|
tstRslt.TimeDivEnd5 = 0;
|
||||||
|
|
||||||
for (int iCmbnd = 0; iCmbnd < Program.WMsCount / 2; iCmbnd++)
|
for (int iCmbnd = 0; iCmbnd < Program.CompoundWMsCount; iCmbnd++)
|
||||||
{
|
{
|
||||||
tstRslt.CombinedMeters[iCmbnd].VolumeRef = tstRslt.VolumeCTV; /// [l] must be calculated before main & aux. meter error
|
tstRslt.CombinedMeters[iCmbnd].VolumeRef = tstRslt.VolumeCTV; /// [l] must be calculated before main & aux. meter error
|
||||||
tstRslt.CombinedMeters[iCmbnd].PulsesMaster = tstRslt.PulsesMaster;
|
tstRslt.CombinedMeters[iCmbnd].PulsesMaster = tstRslt.PulsesMaster;
|
||||||
|
|||||||
@@ -116,9 +116,8 @@ namespace TBF.Entities
|
|||||||
}
|
}
|
||||||
else if (kind == MetersKind.Combined)
|
else if (kind == MetersKind.Combined)
|
||||||
{
|
{
|
||||||
int combinedCount = Program.WMsCount / 2;
|
for (int i = 0; i < 2 * Program.CompoundWMsCount; i++) Meters.Add(new MeterTestResult(this));
|
||||||
for (int i = 0; i < 2 * combinedCount; i++) Meters.Add(new MeterTestResult(this));
|
for (int i = 0; i < Program.CompoundWMsCount; i++) CombinedMeters.Add(new MeterTestResult(this));
|
||||||
for (int i = 0; i < combinedCount; i++) CombinedMeters.Add(new MeterTestResult(this));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,19 +39,19 @@ namespace TBF
|
|||||||
#if DN100 || MUNICH
|
#if DN100 || MUNICH
|
||||||
public const int WMsCount = 3;
|
public const int WMsCount = 3;
|
||||||
public const int LineSize = 3;
|
public const int LineSize = 3;
|
||||||
public const int CompondWMsCount = 1;
|
public const int CompoundWMsCount = 1;
|
||||||
#elif FUZHOU300 || FUZHOU150 || PT200IL
|
#elif FUZHOU300 || FUZHOU150 || PT200IL
|
||||||
public const int WMsCount = 6;
|
public const int WMsCount = 6;
|
||||||
public const int LineSize = 6;
|
public const int LineSize = 6;
|
||||||
public const int CompondWMsCount = 3;
|
public const int CompoundWMsCount = 3;
|
||||||
#elif TORINO50 || BADGER_MALA_TRAT
|
#elif TORINO50 || BADGER_MALA_TRAT
|
||||||
public const int WMsCount = 6;
|
public const int WMsCount = 6;
|
||||||
public const int LineSize = 6;
|
public const int LineSize = 6;
|
||||||
public const int CompondWMsCount = 1;
|
public const int CompoundWMsCount = 1;
|
||||||
#elif TORUN_PT50_2015 || CEVAK_PT40_272
|
#elif TORUN_PT50_2015 || CEVAK_PT40_272
|
||||||
public const int WMsCount = 20;
|
public const int WMsCount = 20;
|
||||||
public const int LineSize = 10;
|
public const int LineSize = 10;
|
||||||
public const int CompondWMsCount = 1;
|
public const int CompoundWMsCount = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("1.5.67.1")]
|
[assembly: AssemblyVersion("1.5.68.1")]
|
||||||
[assembly: AssemblyFileVersion("1.5.67.1")]
|
[assembly: AssemblyFileVersion("1.5.68.1")]
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace TBF.Screens
|
|||||||
int enabledWMsCount = 0;
|
int enabledWMsCount = 0;
|
||||||
if (combined)
|
if (combined)
|
||||||
{
|
{
|
||||||
enabledWMsCount = Program.WMsCount / 2;
|
enabledWMsCount = Program.CompoundWMsCount;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -179,7 +179,7 @@ namespace TBF.Screens
|
|||||||
flowLayoutPanel.AutoScroll = true;
|
flowLayoutPanel.AutoScroll = true;
|
||||||
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (int mtr = 1; mtr <= (combined ? Program.WMsCount / 2 : Program.WMsCount); mtr++)
|
for (int mtr = 1; mtr <= (combined ? Program.CompoundWMsCount : Program.WMsCount); mtr++)
|
||||||
{
|
{
|
||||||
if (combined || (testResults != null && testResults.Count > 0 && !testResults[0].Meters[mtr - 1].Disabled))
|
if (combined || (testResults != null && testResults.Count > 0 && !testResults[0].Meters[mtr - 1].Disabled))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user