From 07261137805c695b65aec7287268b53b4bff38fd Mon Sep 17 00:00:00 2001 From: Thomas Wiedebusch Date: Fri, 6 Jan 2023 11:58:13 +0100 Subject: [PATCH] Comments added to ctlBatch --- ...eterRegisters.csproj.CoreCompileInputs.cache | 2 +- Common/Ui/LegacyGenesisControl/ctlBatch.cs | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache b/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache index b81d5f66..d8b5c8f6 100644 --- a/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache +++ b/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -46bd00889699f5a20a4981a22f62b66368323855 +1a3d4919c9c702245832d925951f2b7cb72fc333 diff --git a/Common/Ui/LegacyGenesisControl/ctlBatch.cs b/Common/Ui/LegacyGenesisControl/ctlBatch.cs index 0282814e..5523f148 100644 --- a/Common/Ui/LegacyGenesisControl/ctlBatch.cs +++ b/Common/Ui/LegacyGenesisControl/ctlBatch.cs @@ -218,14 +218,14 @@ namespace XylemCommonUiLegacyGenCtl //Wait For Caller when every thing is setup break; case BatchState.ReadyForMesuremnt: - //Wait for caller to start Mesurment + //Wait for caller to start Measurement break; case BatchState.StartMesurement: _currentState = StartMeasurement_Internal() ? BatchState.MeasurementActive : BatchState.Error; break; case BatchState.MeasurementActive: - // wait for singal that the messuremnt can be stopped + // wait for signal that the measurement can be stopped break; case BatchState.StopMesurement: @@ -1152,19 +1152,26 @@ namespace XylemCommonUiLegacyGenCtl var MeterReadyForTest = false; while (i >= 0) { - new System.Threading.ManualResetEvent(false).WaitOne(i * 2000); + new ManualResetEvent(false).WaitOne(i * 2000); try { var r = ((GenesisMeter)meter).GetMainMeasurementResult(null, null, true); 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()) { _logger.Info($" Meter {meter.Slot} Meter has progress {r.DutVolumeCm}"); 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; break;