Process data display : many changes, TODO: Meter data and the end of test.
This commit is contained in:
@@ -413,33 +413,51 @@ namespace TBF.Screens
|
||||
|
||||
void OnProcessDataChanged(object sender, ProcessDataEventArgs args)
|
||||
{
|
||||
airTempLabel.Text = ProcessData.AmbientTemp.ToString();
|
||||
///
|
||||
/// Always available
|
||||
///
|
||||
airTempLabel.Text = ProcessData.AmbientTemp.ToString();
|
||||
airPressLabel.Text = ProcessData.AmbientPressure.ToString();
|
||||
airHumiLabel.Text = ProcessData.AmbientHumidity.ToString();
|
||||
|
||||
tInLabel.Text = ProcessData.TempIn.ToString();
|
||||
tOutLabel.Text = ProcessData.TempOut.ToString();
|
||||
prInLabel.Text = ProcessData.PressureUp.ToString();
|
||||
tDivLabel.Text = ProcessData.TempDiv.ToString();
|
||||
|
||||
prInLabel.Text = ProcessData.PressureUp.ToString();
|
||||
prOutLabel.Text = ProcessData.PressureDown.ToString();
|
||||
|
||||
massLabel.Text = ProcessData.Mass.ToString();
|
||||
|
||||
refPulsesLabel.Text = ProcessData.RefCount.ToString();
|
||||
refFreqLabel.Text = ProcessData.RefFreq.ToString();
|
||||
refFlowLabel.Text = Utils.FloatToStr(ProcessData.RefFlow.Val, 4);
|
||||
if (args.TestPhase == Config.Entities.Progress.FlowSetting)
|
||||
{
|
||||
///
|
||||
/// Available when setting the flow
|
||||
///
|
||||
refFreqLabel.Text = ProcessData.RefFreq.ToString();
|
||||
refFlowLabel.Text = Utils.FloatToStr(ProcessData.RefFlow.Val, 4);
|
||||
}
|
||||
|
||||
//if (args.Phase == Config.Entities.Progress.Test)
|
||||
{
|
||||
/// Top part
|
||||
refVolumeLabel.Text = args.Volume.ToString();
|
||||
if (args.TestPhase == Config.Entities.Progress.FlowSetting ||
|
||||
args.TestPhase == Config.Entities.Progress.Test)
|
||||
{
|
||||
///
|
||||
/// Available during a test
|
||||
///
|
||||
refPulsesLabel.Text = ProcessData.RefCount.ToString();
|
||||
double refVolume = ProcessData.LtrPerRefPulse * (double)ProcessData.RefCount.Val;
|
||||
|
||||
//regValvePosLabel.Text = args.RegValvePos.ToString();
|
||||
tDivLabel.Text = args.Tdiv.ToString();
|
||||
float massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val;
|
||||
massDiffLabel.Text = massDiff.ToString("F3");
|
||||
float volumeCtv = 1001.03f * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempOut.Val);
|
||||
volumeCtvLabel.Text = volumeCtv.ToString("F2");
|
||||
double refError = TBF.BenchControl.Formulas.ErrorFromVolumes(refVolume, volumeCtv);
|
||||
refErrorLabel.Text = refError.ToString("F3");
|
||||
|
||||
/// Bottom part
|
||||
if (currentMetersKind == MetersKind.Single)
|
||||
{
|
||||
for (int i = 0; i < textBoxesCount; i++)
|
||||
{
|
||||
/// TODO: Reimplement
|
||||
//pulses[i].Text = args.TestResult.Meters[i].PulsesMeter.ToString();
|
||||
//refPulses[i].Text = args.TestResult.Meters[i].PulsesMaster.ToString();
|
||||
//volume[i].Text = args.TestResult.Meters[i].VolumeMeter.ToString();
|
||||
@@ -450,36 +468,28 @@ namespace TBF.Screens
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
/// TODO: Reimplement
|
||||
//pulses[i].Text = args.TestResult.Meters[i].PulsesMeter.ToString();
|
||||
//refPulses[i].Text = args.TestResult.Meters[i].PulsesMaster.ToString();
|
||||
//volume[i].Text = args.TestResult.Meters[i].VolumeMeter.ToString();
|
||||
//error[i].Text = args.TestResult.Meters[i].VolumeErrorPct.ToString("F2");
|
||||
}
|
||||
/// TODO: Reimplement
|
||||
|
||||
//volume1zLabel.Text = args.TestResult.CombinedMeters[0].VolumeMeter.ToString();
|
||||
//error1zLabel.Text = args.TestResult.CombinedMeters[0].VolumeErrorPct.ToString("F2");
|
||||
}
|
||||
}
|
||||
|
||||
massLabel.Text = args.Mass.ToString();
|
||||
|
||||
if (args.Mass.Valid && args.StartMass.Valid)
|
||||
{
|
||||
massDiffLabel.Text = (args.Mass.Val - args.StartMass.Val).ToString(args.Mass.Format);
|
||||
}
|
||||
|
||||
if (pumpOn != args.PumpOn || diverterToTank != args.DivToTank)
|
||||
{
|
||||
//if (pumpOn != args.PumpOn)
|
||||
//{
|
||||
// if (pumpOn) pumpPictureBox.Image = System.Resources.
|
||||
// else pumpPictureBox.Image = System.Resources.
|
||||
//}
|
||||
pumpOn = args.PumpOn;
|
||||
diverterToTank = args.DivToTank;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
//if (pumpOn != args.PumpOn || diverterToTank != args.DivToTank)
|
||||
//{
|
||||
// //if (pumpOn != args.PumpOn)
|
||||
// //{
|
||||
// // if (pumpOn) pumpPictureBox.Image = System.Resources.
|
||||
// // else pumpPictureBox.Image = System.Resources.
|
||||
// //}
|
||||
// pumpOn = args.PumpOn;
|
||||
// diverterToTank = args.DivToTank;
|
||||
// Invalidate();
|
||||
//}
|
||||
}
|
||||
|
||||
void OnTestCompleted(object sender, TestCompletedEventArgs args)
|
||||
|
||||
Reference in New Issue
Block a user