From 6f7af7906ca8c94a345cd48845fffa4d97c8707f Mon Sep 17 00:00:00 2001
From: Gabriel Fedel <gabriel.fedel@esss.se>
Date: Wed, 8 Jul 2020 09:38:06 +0200
Subject: [PATCH] opi: Fix PVs on adjust windows to use new ones

Change LLRF:AI0-[MAG/ANG] -> LLRF:REFCOMP-CTRLIN-[MAG/ANG]
Change LLRF:AI1-[MAG/ANG] -> LLRF:REFCOMP-REF-[MAG/ANG]
---
 opi/adjust-loop-angle.bob     | 22 ++++++++-----------
 opi/adjust-loop-magnitude.bob | 40 ++++++++++++++++-------------------
 2 files changed, 27 insertions(+), 35 deletions(-)

diff --git a/opi/adjust-loop-angle.bob b/opi/adjust-loop-angle.bob
index 1427ad60..29b5d136 100644
--- a/opi/adjust-loop-angle.bob
+++ b/opi/adjust-loop-angle.bob
@@ -4,8 +4,8 @@
   <width>1100</width>
   <scripts>
     <script file="scripts/callculateLoopDelay.js">
-      <pv_name>$(SYSTEM):AI0-ANG</pv_name>
-      <pv_name>$(SYSTEM):AI1-ANG</pv_name>
+      <pv_name>$(SYSTEM):REFCOMP-CTRLIN-ANG</pv_name>
+      <pv_name>$(SYSTEM):REFCOMP-REF-ANG</pv_name>
       <pv_name>$(SYSTEM):IQSMPL-ANGOFFSETVAL</pv_name>
       <pv_name>$(SYSTEM):IQSMPL-ANGOFFSETEN</pv_name>
       <pv_name>$(SYSTEM):PI-FIXEDSPANG</pv_name>
@@ -27,7 +27,7 @@
     <x>1042</x>
     <y>20</y>
     <width>40</width>
-    <height>40</height>
+    <height>41</height>
   </widget>
   <widget type="rectangle" version="2.0.0">
     <name>Rectangle</name>
@@ -91,11 +91,11 @@
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Display</name>
-    <file>embedded/fixed-point.bob</file>
     <macros>
       <CT>SP</CT>
       <PI_TYPE>PI-I</PI_TYPE>
     </macros>
+    <file>embedded/fixed-point.bob</file>
     <x>270</x>
     <y>470</y>
     <width>460</width>
@@ -103,11 +103,11 @@
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Display_1</name>
-    <file>embedded/fixed-point.bob</file>
     <macros>
       <CT>SP</CT>
       <PI_TYPE>PI-Q</PI_TYPE>
     </macros>
+    <file>embedded/fixed-point.bob</file>
     <x>270</x>
     <y>510</y>
     <width>460</width>
@@ -140,12 +140,8 @@
       <text>Value</text>
       <y>33</y>
       <width>70</width>
-      <foreground_color use_class="true">
-        <color name="Text" red="25" green="25" blue="25">
-        </color>
-      </foreground_color>
-      <horizontal_alignment use_class="true">2</horizontal_alignment>
-      <vertical_alignment use_class="true">1</vertical_alignment>
+      <horizontal_alignment>2</horizontal_alignment>
+      <vertical_alignment>1</vertical_alignment>
     </widget>
     <widget type="textentry" version="3.0.0">
       <name>Text Entry</name>
@@ -198,7 +194,7 @@
   </widget>
   <widget type="textupdate" version="2.0.0">
     <name>Text Update_3</name>
-    <pv_name>$(SYSTEM):AI0-ANG</pv_name>
+    <pv_name>$(SYSTEM):REFCOMP-CTRLIN-ANG</pv_name>
     <x>785</x>
     <y>322</y>
     <width>110</width>
@@ -206,7 +202,7 @@
   </widget>
   <widget type="textupdate" version="2.0.0">
     <name>Text Update_4</name>
-    <pv_name>$(SYSTEM):AI1-ANG</pv_name>
+    <pv_name>$(SYSTEM):REFCOMP-REF-ANG</pv_name>
     <x>785</x>
     <y>410</y>
     <width>110</width>
diff --git a/opi/adjust-loop-magnitude.bob b/opi/adjust-loop-magnitude.bob
index 6e4e3bc6..cc51aa70 100644
--- a/opi/adjust-loop-magnitude.bob
+++ b/opi/adjust-loop-magnitude.bob
@@ -5,7 +5,7 @@
   <height>1100</height>
   <scripts>
     <script file="scripts/callculateLoopGain.js">
-      <pv_name>$(SYSTEM):AI0-MAG</pv_name>
+      <pv_name>$(SYSTEM):REFCOMP-CTRLIN-MAG</pv_name>
       <pv_name>$(SYSTEM):PI-FIXEDSPMAG</pv_name>
       <pv_name>$(SYSTEM):VM-MAGLIMVAL-RBV</pv_name>
       <pv_name>$(SYSTEM):VM-MAGLIMEN-RBV</pv_name>
@@ -15,11 +15,11 @@
   </scripts>
   <widget type="embedded" version="2.0.0">
     <name>Attenuation Setup</name>
-    <file>embedded/att-setup-chan.bob</file>
     <macros>
       <CHAN_NAME>AI3</CHAN_NAME>
       <MAGTYPE>SMON-MAGMINMAX</MAGTYPE>
     </macros>
+    <file>embedded/att-setup-chan.bob</file>
     <x>50</x>
     <y>338</y>
     <width>150</width>
@@ -157,7 +157,7 @@
     <x>1390</x>
     <y>269</y>
     <width>40</width>
-    <height>40</height>
+    <height>41</height>
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>CAVITY H</name>
@@ -209,11 +209,11 @@ Modulator</text>
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Monitor Channel</name>
-    <file>embedded/monitor_chan.bob</file>
     <macros>
       <CHAN_NAME>AI9</CHAN_NAME>
       <MAGTYPE>SMON-MAGMINMAX</MAGTYPE>
     </macros>
+    <file>embedded/monitor_chan.bob</file>
     <x>250</x>
     <y>60</y>
     <width>150</width>
@@ -221,11 +221,11 @@ Modulator</text>
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Monitor Channel_1</name>
-    <file>embedded/monitor_chan.bob</file>
     <macros>
       <CHAN_NAME>AI8</CHAN_NAME>
       <MAGTYPE>SMON-MAGMINMAX</MAGTYPE>
     </macros>
+    <file>embedded/monitor_chan.bob</file>
     <x>45</x>
     <y>60</y>
     <width>150</width>
@@ -233,11 +233,11 @@ Modulator</text>
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Attenuation Setup_1</name>
-    <file>embedded/att-setup-chan.bob</file>
     <macros>
       <CHAN_NAME>AI4</CHAN_NAME>
       <MAGTYPE>SMON-MAGMINMAX</MAGTYPE>
     </macros>
+    <file>embedded/att-setup-chan.bob</file>
     <x>300</x>
     <y>338</y>
     <width>150</width>
@@ -245,11 +245,11 @@ Modulator</text>
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Attenuation Setup_2</name>
-    <file>embedded/att-setup-chan.bob</file>
     <macros>
       <CHAN_NAME>AI5</CHAN_NAME>
       <MAGTYPE>SMON-MAGMINMAX</MAGTYPE>
     </macros>
+    <file>embedded/att-setup-chan.bob</file>
     <x>470</x>
     <y>338</y>
     <width>150</width>
@@ -257,11 +257,11 @@ Modulator</text>
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Attenuation Setup_3</name>
-    <file>embedded/att-setup-chan.bob</file>
     <macros>
       <CHAN_NAME>AI6</CHAN_NAME>
       <MAGTYPE>SMON-MAGMINMAX</MAGTYPE>
     </macros>
+    <file>embedded/att-setup-chan.bob</file>
     <x>730</x>
     <y>328</y>
     <width>150</width>
@@ -269,11 +269,11 @@ Modulator</text>
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Attenuation Setup_4</name>
-    <file>embedded/att-setup-chan.bob</file>
     <macros>
       <CHAN_NAME>AI7</CHAN_NAME>
       <MAGTYPE>SMON-MAGMINMAX</MAGTYPE>
     </macros>
+    <file>embedded/att-setup-chan.bob</file>
     <x>900</x>
     <y>328</y>
     <width>150</width>
@@ -281,11 +281,11 @@ Modulator</text>
   </widget>
   <widget type="embedded" version="2.0.0">
     <name>Attenuation Setup_5</name>
-    <file>embedded/att-setup-chan.bob</file>
     <macros>
       <CHAN_NAME>AI2</CHAN_NAME>
       <MAGTYPE>SMON-MAGMINMAX</MAGTYPE>
     </macros>
+    <file>embedded/att-setup-chan.bob</file>
     <x>50</x>
     <y>583</y>
     <width>150</width>
@@ -387,7 +387,7 @@ Attenuation</text>
     </widget>
     <widget type="textentry" version="3.0.0">
       <name>Text Entry_2</name>
-      <pv_name>$(SYSTEM):AI8-ATT</pv_name>
+      <pv_name>$(SYSTEM):VMOUT-ATT</pv_name>
       <x>15</x>
       <y>50</y>
       <width>140</width>
@@ -395,7 +395,7 @@ Attenuation</text>
     </widget>
     <widget type="textupdate" version="2.0.0">
       <name>Text Update_2</name>
-      <pv_name>$(SYSTEM):AI8-ATT-RBV</pv_name>
+      <pv_name>$(SYSTEM):VMOUT-ATT-RBV</pv_name>
       <x>15</x>
       <y>90</y>
       <width>140</width>
@@ -425,11 +425,11 @@ Attenuation</text>
     </widget>
     <widget type="embedded" version="2.0.0">
       <name>Display</name>
-      <file>embedded/fixed-point.bob</file>
       <macros>
         <CT>SP</CT>
         <PI_TYPE>PI-Q</PI_TYPE>
       </macros>
+      <file>embedded/fixed-point.bob</file>
       <x>10</x>
       <y>30</y>
       <width>460</width>
@@ -437,11 +437,11 @@ Attenuation</text>
     </widget>
     <widget type="embedded" version="2.0.0">
       <name>Display_1</name>
-      <file>embedded/fixed-point.bob</file>
       <macros>
         <CT>SP</CT>
         <PI_TYPE>PI-I</PI_TYPE>
       </macros>
+      <file>embedded/fixed-point.bob</file>
       <x>10</x>
       <y>70</y>
       <width>460</width>
@@ -484,12 +484,8 @@ Attenuation</text>
       <text>Value</text>
       <y>33</y>
       <width>70</width>
-      <foreground_color use_class="true">
-        <color name="Text" red="25" green="25" blue="25">
-        </color>
-      </foreground_color>
-      <horizontal_alignment use_class="true">2</horizontal_alignment>
-      <vertical_alignment use_class="true">1</vertical_alignment>
+      <horizontal_alignment>2</horizontal_alignment>
+      <vertical_alignment>1</vertical_alignment>
     </widget>
     <widget type="textentry" version="3.0.0">
       <name>Text Entry_3</name>
@@ -607,7 +603,7 @@ Attenuation</text>
   </widget>
   <widget type="textupdate" version="2.0.0">
     <name>Text Update_5</name>
-    <pv_name>$(SYSTEM):AI0-MAG</pv_name>
+    <pv_name>$(SYSTEM):REFCOMP-CTRLIN-MAG</pv_name>
     <x>940</x>
     <y>763</y>
     <width>160</width>
@@ -615,7 +611,7 @@ Attenuation</text>
   </widget>
   <widget type="textupdate" version="2.0.0">
     <name>Text Update_6</name>
-    <pv_name>$(SYSTEM):AI1-MAG</pv_name>
+    <pv_name>$(SYSTEM):REFCOMP-REF-MAG</pv_name>
     <x>940</x>
     <y>904</y>
     <width>160</width>
-- 
GitLab