From 9b57e5251eeddb7d56619c6141bd3d895c66da1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kriszti=C3=A1n=20L=C3=B6ki?= <krisztian.loki@ess.eu>
Date: Wed, 13 Jan 2021 14:19:14 +0100
Subject: [PATCH] Flash SCP rectangle if isolation !confirmed

---
 NON-APPROVED/pss1-pss/PSS1_PSS_Area.bob | 85 +++++++++++++++----------
 1 file changed, 50 insertions(+), 35 deletions(-)

diff --git a/NON-APPROVED/pss1-pss/PSS1_PSS_Area.bob b/NON-APPROVED/pss1-pss/PSS1_PSS_Area.bob
index d44df52f..1681fb69 100644
--- a/NON-APPROVED/pss1-pss/PSS1_PSS_Area.bob
+++ b/NON-APPROVED/pss1-pss/PSS1_PSS_Area.bob
@@ -421,16 +421,6 @@
       <transparent>true</transparent>
       <tooltip>$(actions)</tooltip>
     </widget>
-    <widget type="label" version="2.0.0">
-      <name>LB_PLC Permit</name>
-      <text>PLC Permit</text>
-      <x>210</x>
-      <y>108</y>
-      <width>120</width>
-      <vertical_alignment>1</vertical_alignment>
-      <actions>
-      </actions>
-    </widget>
     <widget type="action_button" version="3.0.0">
       <name>AB_PLC Permit</name>
       <actions>
@@ -440,12 +430,11 @@
           <description>Open Display</description>
         </action>
       </actions>
-      <text></text>
+      <text>PLC Permits</text>
       <x>210</x>
       <y>108</y>
       <width>120</width>
-      <height>20</height>
-      <transparent>true</transparent>
+      <height>23</height>
       <tooltip>$(actions)</tooltip>
     </widget>
   </widget>
@@ -1830,10 +1819,18 @@ Exit Door 1</text>
     <square>true</square>
     <rules>
       <rule name="Visibility" prop_id="visible" out_exp="true">
+        <exp bool_exp="not pvInt0">
+          <expression>False</expression>
+        </exp>
+        <exp bool_exp="pvInt1">
+          <expression>True</expression>
+        </exp>
         <exp bool_exp="True">
-          <expression>pvInt0</expression>
+          <expression>pvInt2</expression>
         </exp>
         <pv_name>$(pv_name)</pv_name>
+        <pv_name>KG-NCG:PSS-Area-1:DTL4isolationConfirmed</pv_name>
+        <pv_name>sim://flipflop(1)</pv_name>
       </rule>
     </rules>
   </widget>
@@ -1850,10 +1847,18 @@ Exit Door 1</text>
     <square>true</square>
     <rules>
       <rule name="Visibility" prop_id="visible" out_exp="true">
+        <exp bool_exp="not pvInt0">
+          <expression>False</expression>
+        </exp>
+        <exp bool_exp="pvInt1">
+          <expression>True</expression>
+        </exp>
         <exp bool_exp="True">
-          <expression>pvInt0</expression>
+          <expression>pvInt2</expression>
         </exp>
         <pv_name>$(pv_name)</pv_name>
+        <pv_name>KG-NCG:PSS-Area-1:DTL2DTL3isolationConfirmed</pv_name>
+        <pv_name>sim://flipflop(1)</pv_name>
       </rule>
     </rules>
   </widget>
@@ -1870,10 +1875,18 @@ Exit Door 1</text>
     <square>true</square>
     <rules>
       <rule name="Visibility" prop_id="visible" out_exp="true">
+        <exp bool_exp="not pvInt0">
+          <expression>False</expression>
+        </exp>
+        <exp bool_exp="pvInt1">
+          <expression>True</expression>
+        </exp>
         <exp bool_exp="True">
-          <expression>pvInt0</expression>
+          <expression>pvInt2</expression>
         </exp>
         <pv_name>$(pv_name)</pv_name>
+        <pv_name>KG-NCG:PSS-Area-1:DTL2DTL3isolationConfirmed</pv_name>
+        <pv_name>sim://flipflop(1)</pv_name>
       </rule>
     </rules>
   </widget>
@@ -1890,10 +1903,18 @@ Exit Door 1</text>
     <square>true</square>
     <rules>
       <rule name="Visibility" prop_id="visible" out_exp="true">
+        <exp bool_exp="not pvInt0">
+          <expression>False</expression>
+        </exp>
+        <exp bool_exp="pvInt1">
+          <expression>True</expression>
+        </exp>
         <exp bool_exp="True">
-          <expression>pvInt0</expression>
+          <expression>pvInt2</expression>
         </exp>
         <pv_name>$(pv_name)</pv_name>
+        <pv_name>KG-NCG:PSS-Area-1:RFQDTL1isolationConfirmed</pv_name>
+        <pv_name>sim://flipflop(1)</pv_name>
       </rule>
     </rules>
   </widget>
@@ -1910,27 +1931,21 @@ Exit Door 1</text>
     <square>true</square>
     <rules>
       <rule name="Visibility" prop_id="visible" out_exp="true">
+        <exp bool_exp="not pvInt0">
+          <expression>False</expression>
+        </exp>
+        <exp bool_exp="pvInt1">
+          <expression>True</expression>
+        </exp>
         <exp bool_exp="True">
-          <expression>pvInt0</expression>
+          <expression>pvInt2</expression>
         </exp>
         <pv_name>$(pv_name)</pv_name>
+        <pv_name>KG-NCG:PSS-Area-1:RFQDTL1isolationConfirmed</pv_name>
+        <pv_name>sim://flipflop(1)</pv_name>
       </rule>
     </rules>
   </widget>
-  <widget type="rectangle" version="2.0.0">
-    <name>RFQ SCP</name>
-    <x>478</x>
-    <y>523</y>
-    <width>20</width>
-    <height>30</height>
-    <visible>false</visible>
-    <line_width>1</line_width>
-    <line_color>
-      <color name="Text" red="25" green="25" blue="25">
-      </color>
-    </line_color>
-    <transparent>true</transparent>
-  </widget>
   <widget type="label" version="2.0.0">
     <name>AMM_204</name>
     <text>TSW
@@ -2052,10 +2067,10 @@ Door</text>
   </widget>
   <widget type="label" version="2.0.0">
     <name>Permits</name>
-    <text>Permits</text>
-    <x>651</x>
+    <text>PSS Permits</text>
+    <x>654</x>
     <y>31</y>
-    <width>348</width>
+    <width>346</width>
     <height>30</height>
     <font>
       <font name="Header 2" family="Source Sans Pro" style="BOLD_ITALIC" size="21.0">
-- 
GitLab