Skip to content

Commit

Permalink
Remove lock_lost paramter
Browse files Browse the repository at this point in the history
  • Loading branch information
bleykauf committed Oct 18, 2024
1 parent 5dd14a7 commit 17e9968
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
18 changes: 7 additions & 11 deletions linien-server/linien_server/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,8 @@ def __init__(self):
"""

# ------------------- QATCH LOCK AND RELOCKING ---------------------------------

self.lock_lost = Parameter(start=False, loggable=True)
"""Set to True if `watch_lock` is enabled and lock is lost."""

self.watch_lock = Parameter(start=False, restorable=True, loggable=True)
"""Watch the lock state and set `lock_lost` to True if lock is lost."""
"""Watch the lock state and set `lock_status` to `LOST` if lock is lost."""

self.watch_lock_control = Parameter(start=False, restorable=True, loggable=True)
"""Watch the lock state on the control channel."""
Expand All @@ -546,30 +542,30 @@ def __init__(self):
self.watch_lock_control_min = Parameter(
start=-0.9, restorable=True, loggable=True
)
"""Lower bound for control signal below which `lock_lost` is triggered."""
"""Lower bound for control signal below which `lock_status` is set to `LOST`."""

self.watch_lock_control_max = Parameter(
start=0.9, restorable=True, loggable=True
)
"""Upper bound for control signal above which `lock_lost` is triggered."""
"""Upper bound for control signal above which `lock_status` is set to `LOST`."""

self.watch_lock_error_min = Parameter(
start=-0.9, restorable=True, loggable=True
)
"""Lower bound for error signal below which `lock_lost` is triggered."""
"""Lower bound for error signal below which `lock_status` is set to `LOST`."""

self.watch_lock_error_max = Parameter(start=0.9, restorable=True, loggable=True)
"""Upper bound for error signal above which `lock_lost` is triggered."""
"""Upper bound for error signal above which `lock_status` is set to `LOST`."""

self.watch_lock_monitor_min = Parameter(
start=-0.9, restorable=True, loggable=True
)
"""Lower bound for monitor signal below which `lock_lost` is triggered."""
"""Lower bound for monitor signal below which `lock_status` is set to `LOST`."""

self.watch_lock_monitor_max = Parameter(
start=0.9, restorable=True, loggable=True
)
"""Upper bound for monitor signal above which `lock_lost` is triggered."""
"""Upper bound for monitor signal above which `lock_status` is set to `LOST`."""

# ------------------- AUTOLOCK PARAMETERS --------------------------------------
# These parameters are used internally by the optimization algorithm.
Expand Down
7 changes: 3 additions & 4 deletions linien-server/linien_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,11 @@ def _push_acquired_data_to_parameters(self, stop_event: Event):
is_locked,
self.parameters.control_signal_history_length.value,
)
self.parameters.lock_lost.value = data_loaded.get(
"lock_lost", False
)
lock_lost = data_loaded.get("lock_lost", False)
if (
self.parameters.watch_lock.value
and self.parameters.lock_lost.value
and lock_lost
and self.parameters.autolock_status.value != AutolockStatus.LOST
):
self.parameters.autolock_status.value = AutolockStatus.LOST

Expand Down

0 comments on commit 17e9968

Please sign in to comment.