From 5a5f8493f2607e3dc03fe0b9caecae4ab41790bb Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Sun, 23 Jan 2022 13:18:36 +0100 Subject: [PATCH] IperlHead : Simultaneous serial port flushing after switching to the test mode. --- .../TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs index 99fab1f46..9175a741c 100644 --- a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs +++ b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs @@ -444,7 +444,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead Q2ErrWOCorrection = 0; Q2CorrRL = 0; Q2CorrLR = 0; - + + if (optoSerialPort != null && optoSerialPort.IsOpen) + { + optoSerialPort.DiscardInBuffer(); + } StartDataStreamProcessing(); currentFlowDir = InitFlowDir;