Skip to content
Snippets Groups Projects
Commit ea63092b authored by Jan David Mol's avatar Jan David Mol
Browse files

Merge branch 'L2SS-664-recv-unb2-timeout-property' into 'master'

L2SS-664: Make timeouts to run commands on hardware parameterised as properties

Closes L2SS-664

See merge request !255
parents e91cb175 29d0f5a2
Branches
Tags
1 merge request!255L2SS-664: Make timeouts to run commands on hardware parameterised as properties
......@@ -42,6 +42,15 @@ class APSCT(opcua_device):
default_value=1
)
# ----- Timing values
APSCT_On_Off_timeout = device_property(
doc='Maximum amount of time to wait after turning APSCT on or off',
dtype='DevFloat',
mandatory=False,
default_value=10.0
)
# ----------
# Attributes
# ----------
......@@ -113,9 +122,9 @@ class APSCT(opcua_device):
# Cycle clock
self.APSCT_off()
self.wait_attribute("APSCTTR_translator_busy_R", False, 10)
self.wait_attribute("APSCTTR_translator_busy_R", False, self.APSCT_On_Off_timeout)
self.APSCT_200MHz_on()
self.wait_attribute("APSCTTR_translator_busy_R", False, 10)
self.wait_attribute("APSCTTR_translator_busy_R", False, self.APSCT_On_Off_timeout)
if not self.proxy.APSCT_PLL_200MHz_locked_R:
if self.proxy.APSCTTR_I2C_error_R:
......
......@@ -79,6 +79,22 @@ class RECV(opcua_device):
'RCU_mask_RW'
]
# ----- Timing values
RCU_On_Off_timeout = device_property(
doc='Maximum amount of time to wait after turning RCU(s) on or off',
dtype='DevFloat',
mandatory=False,
default_value=10.0
)
RCU_DTH_On_Off_timeout = device_property(
doc='Maximum amount of time to wait after turning dithering on or off',
dtype='DevFloat',
mandatory=False,
default_value=10.0
)
# ----- Calibration values
HBAT_bf_delay_step_delays = device_property(
......@@ -374,13 +390,13 @@ class RECV(opcua_device):
# Cycle RCUs
self.RCU_off()
self.wait_attribute("RECVTR_translator_busy_R", False, 5)
self.wait_attribute("RECVTR_translator_busy_R", False, self.RCU_On_Off_timeout)
self.RCU_on()
self.wait_attribute("RECVTR_translator_busy_R", False, 5)
self.wait_attribute("RECVTR_translator_busy_R", False, self.RCU_On_Off_timeout)
# Turn off DTH by default
self.RCU_DTH_off()
self.wait_attribute("RECVTR_translator_busy_R", False, 5)
self.wait_attribute("RECVTR_translator_busy_R", False, self.RCU_DTH_On_Off_timeout)
# ----------
# Run server
......
......@@ -44,6 +44,15 @@ class UNB2(opcua_device):
default_value=1
)
# ----- Timing values
UNB2_On_Off_timeout = device_property(
doc='Maximum amount of time to wait after turning Uniboard(s) on or off',
dtype='DevFloat',
mandatory=False,
default_value=10.0
)
# ----------
# Attributes
# ----------
......@@ -217,9 +226,9 @@ class UNB2(opcua_device):
# Cycle UNB2s
self.UNB2_off()
self.wait_attribute("UNB2TR_translator_busy_R", False, 5)
self.wait_attribute("UNB2TR_translator_busy_R", False, self.UNB2_On_Off_timeout)
self.UNB2_on()
self.wait_attribute("UNB2TR_translator_busy_R", False, 5)
self.wait_attribute("UNB2TR_translator_busy_R", False, self.UNB2_On_Off_timeout)
# ----------
# Run server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment