From 41aecc89f184556d9953ad09bacff60a5878b5c8 Mon Sep 17 00:00:00 2001 From: Thomas Wiedebusch Date: Thu, 27 Apr 2023 10:41:18 +0200 Subject: [PATCH] Changed ProtocolCore configuration from x86 to Any CPU --- Common/Common.sln | 8 ++++---- .../Interfaces/Protocols/ProtocolCore/BaseProtocol.cs | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Common/Common.sln b/Common/Common.sln index f7d708dc..43c17d7a 100644 --- a/Common/Common.sln +++ b/Common/Common.sln @@ -3873,8 +3873,8 @@ Global {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.COM|x86.Build.0 = COM|x86 {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|x64.ActiveCfg = Debug|x64 {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|x64.Build.0 = Debug|x64 {BA17D20E-0CEB-4B27-9772-2392BD750ED5}.Debug|x86.ActiveCfg = Debug|x86 @@ -3937,8 +3937,8 @@ Global {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.COM|x86.Build.0 = _MANUAL_CONTROL|x86 {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|x64.ActiveCfg = Debug|x64 {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|x64.Build.0 = Debug|x64 {8BDD2789-96D4-43EA-AAD7-0F49D0347998}.Debug|x86.ActiveCfg = Debug|x86 diff --git a/Common/Hardware/Interfaces/Protocols/ProtocolCore/BaseProtocol.cs b/Common/Hardware/Interfaces/Protocols/ProtocolCore/BaseProtocol.cs index 32e28fbe..97b7d8c2 100644 --- a/Common/Hardware/Interfaces/Protocols/ProtocolCore/BaseProtocol.cs +++ b/Common/Hardware/Interfaces/Protocols/ProtocolCore/BaseProtocol.cs @@ -70,7 +70,7 @@ namespace Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore while (_decodingThread.ThreadState != ThreadState.Stopped && timeoutCounter > 0) { Thread.Sleep(1); - timeoutCounter = timeoutCounter - 1; + timeoutCounter -= 1; } if (_decodingThread.ThreadState != ThreadState.Stopped) @@ -110,9 +110,7 @@ namespace Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore { while (!_decodingToken.IsCancellationRequested) { - - IPortDataEventArgs receivedRecord; - while (_decodingFifo.TryDequeue(out receivedRecord)) + while (_decodingFifo.TryDequeue(out var receivedRecord)) { DecodeRecord(receivedRecord); }