From 3af690cd65596815d50a380cb72c00e205cec0b7 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Tue, 2 Nov 2021 15:07:27 +0100
Subject: [PATCH] L2SS-449: Fix RECV attributes that use self inspection.

---
 .../tangostationcontrol/devices/recv.py            | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tangostationcontrol/tangostationcontrol/devices/recv.py b/tangostationcontrol/tangostationcontrol/devices/recv.py
index a9eee4160..7de3149bc 100644
--- a/tangostationcontrol/tangostationcontrol/devices/recv.py
+++ b/tangostationcontrol/tangostationcontrol/devices/recv.py
@@ -58,7 +58,7 @@ class RECV(opcua_device):
     # Attributes
     # ----------
     ANT_status_R = attribute(dtype=str, max_dim_x=3, max_dim_y=32)
-    RCU_LED_colour_R = attribute(dtype=numpy.uint32, max_dim_x=32, fget=lambda self: (2 * self.RCU_LED_green_on_R + 4 * self.RCU_LED_red_on_R).astype(numpy.uint32))
+    RCU_LED_colour_R = attribute(dtype=numpy.uint32, max_dim_x=32, fget=lambda self: (2 * self.proxy.RCU_LED_green_on_R + 4 * self.proxy.RCU_LED_red_on_R).astype(numpy.uint32))
 
     ANT_mask_RW                  = attribute_wrapper(comms_annotation=["ANT_mask_RW"               ],datatype=numpy.bool_  , dims=(3,32), access=AttrWriteType.READ_WRITE)
     HBAT_BF_delays_R             = attribute_wrapper(comms_annotation=["HBAT_BF_delays_R"          ],datatype=numpy.int64  , dims=(32,96))
@@ -170,8 +170,8 @@ class RECV(opcua_device):
 
             This function can be used as input to modify the RCU_mask_RW. """
 
-        rcu_mask = self.RCU_mask_RW
-        i2c_errors = self.RCU_I2C_STATUS_R
+        rcu_mask = self.proxy.RCU_mask_RW
+        i2c_errors = self.proxy.RCU_I2C_STATUS_R
 
         nr_rcus = len(rcu_mask)
         rcu_status = [""] * nr_rcus
@@ -195,10 +195,10 @@ class RECV(opcua_device):
 
             This function can be used as input to modify the Ant_mask_RW. """
 
-        ant_mask = self.ANT_mask_RW
-        rcu_mask = self.RCU_mask_RW
-        adc_lock = self.RCU_ADC_locked_R
-        i2c_errors = self.RCU_I2C_STATUS_R
+        ant_mask = self.proxy.ANT_mask_RW
+        rcu_mask = self.proxy.RCU_mask_RW
+        adc_lock = self.proxy.RCU_ADC_locked_R
+        i2c_errors = self.proxy.RCU_I2C_STATUS_R
 
         nr_rcus = len(ant_mask)
         nr_ants_per_rcu = len(ant_mask[0])
-- 
GitLab