Skip to content
Snippets Groups Projects
Commit ccb75303 authored by Corné Lukken's avatar Corné Lukken
Browse files

L2SS-708: Allow set pointing in STANDBY

parent bf916a0c
No related branches found
No related tags found
1 merge request!251Resolve L2SS-484
......@@ -179,8 +179,6 @@ class lofar_device(Device, metaclass=DeviceMeta):
self.set_state(DevState.ON)
self.set_status("Device is in the ON state.")
self.post_on_state()
@command()
@DebugIt()
@log_exceptions()
......@@ -245,10 +243,6 @@ class lofar_device(Device, metaclass=DeviceMeta):
"""Overloadable function called in initialise with state INIT, STANDBY after call"""
pass
def post_on_state(self):
"""Overloadable function called in On AFTER state is set to ON"""
pass
def always_executed_hook(self):
"""Method always executed before any TANGO command is executed."""
pass
......
......@@ -143,13 +143,6 @@ class TileBeam(lofar_device):
super().configure_for_off()
@log_exceptions()
def post_on_state(self):
super().post_on_state()
if self._hbat_tracking_enabled_rw:
self.HBAT_beam_tracker.unlock_thread()
# --------
# internal functions
# --------
......@@ -265,7 +258,7 @@ class TileBeam(lofar_device):
@command(dtype_in=DevVarStringArray, dtype_out=DevVarDoubleArray)
@DebugIt()
@log_exceptions()
@only_in_states([DevState.ON])
@only_in_states([DevState.ON, DevState.STANDBY])
def HBAT_delays(self, pointing_direction: numpy.array, timestamp: datetime.datetime = None):
"""
Calculate the delays (in seconds) based on the pointing list and the timestamp
......@@ -286,7 +279,7 @@ class TileBeam(lofar_device):
@command(dtype_in=DevVarStringArray)
@DebugIt()
@log_exceptions()
@only_in_states([DevState.ON])
@only_in_states([DevState.ON, DevState.STANDBY])
def HBAT_set_pointing(self, pointing_direction: list, timestamp: datetime.datetime = None):
"""
Uploads beam weights based on a given pointing direction 2D array (96 tiles x 3 parameters)
......@@ -304,7 +297,7 @@ class TileBeam(lofar_device):
@command(dtype_in = DevString)
@DebugIt()
@only_in_states([DevState.ON])
@only_in_states([DevState.ON, DevState.STANDBY])
def HBAT_set_pointing_for_specific_time(self, parameters: DevString = None):
"""
Uploads beam weights based on a given pointing direction 2D array (96 tiles x 3 parameters)
......@@ -349,9 +342,6 @@ class BeamTracker():
self.update_lock = Lock()
self.update_condition = Condition(self.update_lock)
# Block thread activity until device is ready
self.update_lock.acquire()
# Whether the pointing has to be forced updated
self.stale_pointing = True
......@@ -377,9 +367,6 @@ class BeamTracker():
self.stale_pointing = True
self.notify_thread()
def unlock_thread(self):
self.update_lock.release()
def notify_thread(self):
# inform the thread to stop waiting
with self.update_lock:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment