diff --git a/Common/.vs/config/applicationhost.config b/Common/.vs/config/applicationhost.config index ecc20ba7..a894c3cf 100644 --- a/Common/.vs/config/applicationhost.config +++ b/Common/.vs/config/applicationhost.config @@ -155,7 +155,7 @@ - + diff --git a/Common/CommonConsole/Program.cs b/Common/CommonConsole/Program.cs index 3d7ed8c7..8eb214ae 100644 --- a/Common/CommonConsole/Program.cs +++ b/Common/CommonConsole/Program.cs @@ -17,6 +17,7 @@ var us = new CultureInfo("en-US"); var de = new CultureInfo("de-DE"); var any = NumberStyles.Any; + var skipNext = true; foreach (var line in messurementLines) { @@ -39,6 +40,16 @@ } parsedData = new List(); + skipNext = true; + + continue; + } + + if (skipNext) + { + skipNext = false; + + continue; } var lineTokens = line.Split(new[] { '\t' }, StringSplitOptions.RemoveEmptyEntries); @@ -65,9 +76,13 @@ Timestamp = timestamp }); } - - File.WriteAllLines(@".\messurements.csv", new[] { Messurement.Header }); - File.WriteAllLines(@".\messurements.csv", messurements.Select(x => x.ToString())); + + File.WriteAllLines(@".\messurements.csv", messurements.Select(x + => $"{x.PcbId,10}\t" + + $"{x.AvgT,5:0.00}\t" + + $"{x.AvgTOF,12:0.0000000000}\t" + + $"{x.DifferenceT,5:00.00}\t" + + $"{x.DifferenceTOF,12:0.0000000000}")); Console.WriteLine(Messurement.Header); 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 82bc2c16..8865d283 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 @@ -bf6bb8fceb3db5a9977dadc407cf576684bf7127 +89102b0142e574de38a9f47d370f3334e5e6c268 diff --git a/Common/TempFlansh/Program.cs b/Common/TempFlansh/Program.cs index 56126532..623bee88 100644 --- a/Common/TempFlansh/Program.cs +++ b/Common/TempFlansh/Program.cs @@ -37,10 +37,8 @@ namespace TempFlansh Console.Write("Waiting for client connection..."); pipeServer.WaitForConnection(); Console.Write("Open Comport"); - - - Console.WriteLine("Client connected."); + try { // Read user input and send that to the client process. diff --git a/Common/TempFlansh/TempHelper.cs b/Common/TempFlansh/TempHelper.cs index 3fddc553..d8d1ea7f 100644 --- a/Common/TempFlansh/TempHelper.cs +++ b/Common/TempFlansh/TempHelper.cs @@ -245,7 +245,6 @@ namespace TempFlansh public double ReadCurrentDisplayValue() { - Int16 i16Priority; double dblFloatValue; Int32 i32IntergerValue; diff --git a/Common/Ui/GenesisToolBox/Infrastructure/TempMeterModels.cs b/Common/Ui/GenesisToolBox/Infrastructure/TempMeterModels.cs index 2aa3445f..fd32a552 100644 --- a/Common/Ui/GenesisToolBox/Infrastructure/TempMeterModels.cs +++ b/Common/Ui/GenesisToolBox/Infrastructure/TempMeterModels.cs @@ -87,6 +87,12 @@ this.pipeReader?.Dispose(); this.pipeStream?.Dispose(); } + + public void Flush() + { + this.pipeStream.Flush(); + this.pipeReader.BaseStream.Flush(); + } } partial class AutomaticTemperatureCalibration @@ -117,13 +123,15 @@ this.shortTimer.Interval = 1_000; this.shortTimer.Elapsed += this.ShortTimerElapsed; + // this.shortTimer.Start(); + this.shortTimer.Stop(); this.longTimer.Enabled = true; this.longTimer.AutoReset = true; this.longTimer.Interval = 300_000; this.longTimer.Elapsed += this.LongTimerElapsed; - + this.longTimer.Start(); } @@ -133,15 +141,15 @@ if (this.messuring) { - System.Threading.Thread.Sleep(1000); - + System.Threading.Thread.Sleep(1_000); + this.shortTimer.Start(); } else { this.shortTimer.Stop(); - System.Threading.Thread.Sleep(1000); + System.Threading.Thread.Sleep(1_000); File.AppendAllText(this.messurementsFile, Environment.NewLine); } }