From 498fc21412f36768d9ff9d2abd4fd377ea0bf3ae Mon Sep 17 00:00:00 2001 From: Michal Buzik Date: Mon, 11 Nov 2024 14:18:39 +0100 Subject: [PATCH] DIVERTER close valve end time - Mark Chenges --- TBF/Rig/BuiltIn/SetValvesOp.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/TBF/Rig/BuiltIn/SetValvesOp.cs b/TBF/Rig/BuiltIn/SetValvesOp.cs index 35c868bcd..4ded37d00 100644 --- a/TBF/Rig/BuiltIn/SetValvesOp.cs +++ b/TBF/Rig/BuiltIn/SetValvesOp.cs @@ -29,12 +29,14 @@ namespace TBF.Rig.BuiltIn /// Relative time in [s] from the start of the operation int timeShift; /// Set in SetValvesOp(cb, bool open, OutputPath outPath, DateTimeBox timeStamp) - /// - /// Processes coupled valves and creates switch points. - /// - /// A list of opening master valves - /// A list of closing master valves - /// + int waitOnCBDelay = 2; // additional wait for the correct ControlBoard response in [s] + + /// + /// Processes coupled valves and creates switch points. + /// + /// A list of opening master valves + /// A list of closing master valves + /// IList AddSwitchPoints(IList swPoints, IList valvesOpen, IList valvesClose, int time) { int ix0 = swPoints.Count; @@ -277,7 +279,7 @@ namespace TBF.Rig.BuiltIn { if (nextIx >= switchPoints.Count) { - return (StateMachine.Time >= swStartTime + maxDelayTime) ? Event.ValvesSet : Event.ValvesBusy; + return (StateMachine.Time >= swStartTime + maxDelayTime + waitOnCBDelay) ? Event.ValvesSet : Event.ValvesBusy; } if (StateMachine.Time >= swStartTime + switchPoints[nextIx].TimeSec)