Comments added to ctlBatch

This commit is contained in:
Thomas Wiedebusch
2023-01-06 11:58:13 +01:00
parent 56fe72e871
commit 0726113780
2 changed files with 13 additions and 6 deletions
@@ -1 +1 @@
46bd00889699f5a20a4981a22f62b66368323855 1a3d4919c9c702245832d925951f2b7cb72fc333
+12 -5
View File
@@ -218,14 +218,14 @@ namespace XylemCommonUiLegacyGenCtl
//Wait For Caller when every thing is setup //Wait For Caller when every thing is setup
break; break;
case BatchState.ReadyForMesuremnt: case BatchState.ReadyForMesuremnt:
//Wait for caller to start Mesurment //Wait for caller to start Measurement
break; break;
case BatchState.StartMesurement: case BatchState.StartMesurement:
_currentState = StartMeasurement_Internal() ? BatchState.MeasurementActive : BatchState.Error; _currentState = StartMeasurement_Internal() ? BatchState.MeasurementActive : BatchState.Error;
break; break;
case BatchState.MeasurementActive: case BatchState.MeasurementActive:
// wait for singal that the messuremnt can be stopped // wait for signal that the measurement can be stopped
break; break;
case BatchState.StopMesurement: case BatchState.StopMesurement:
@@ -1152,19 +1152,26 @@ namespace XylemCommonUiLegacyGenCtl
var MeterReadyForTest = false; var MeterReadyForTest = false;
while (i >= 0) while (i >= 0)
{ {
new System.Threading.ManualResetEvent(false).WaitOne(i * 2000); new ManualResetEvent(false).WaitOne(i * 2000);
try try
{ {
var r = ((GenesisMeter)meter).GetMainMeasurementResult(null, null, true); var r = ((GenesisMeter)meter).GetMainMeasurementResult(null, null, true);
i -= sleepTimeS; i -= sleepTimeS;
//when Start and Stop Record have diffrent Volumes the meter is ready for test //when Start and Stop Record have different Volumes the meter is ready for test,
//if a measurement hasn't finished, the StopRecord is an intermediate record, as
//this will be used for intermediate tolerance calculation.
//ReSharper disable once CompareOfFloatsByEqualityOperator as the rounding will take place in the
//Cordonel and only an unequally value needs to be detected
if (r.DutStartRecord.GetVolumeCm() != r.DutStopRecord.GetVolumeCm()) if (r.DutStartRecord.GetVolumeCm() != r.DutStopRecord.GetVolumeCm())
{ {
_logger.Info($" Meter {meter.Slot} Meter has progress {r.DutVolumeCm}"); _logger.Info($" Meter {meter.Slot} Meter has progress {r.DutVolumeCm}");
TryInvoke(new Action(() => TryInvoke(new Action(() =>
{ {
// updateCell($"Status", meter.Slot, $"Zählerstand wechsel erfasst Von:{r.DutStartRecord.GetVolumeCm()} Auf: {r.DutStopRecord.GetVolumeCm()}", Color.LimeGreen); //updateCell("Status", meter.Slot, "Zählerstandwechsel erfasst " +
// $"Von: {r.DutStartRecord.GetVolumeCm()} " +
// $"Auf: {r.DutStopRecord.GetVolumeCm()}",
// Color.LimeGreen);
})); }));
MeterReadyForTest = true; MeterReadyForTest = true;
break; break;