Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions nslsii/temperature_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ def timer_cleanup():
self.readback.clear_sub(status_indicator)
status._finished(success=False)

# Add a Timer to ensure that timeout occurs.
self._cb_timer = threading.Timer(self.timeout.get(), timer_cleanup)

self._cb_timer.start()
# set up the done moving indicator logic
def status_indicator(value, timestamp, **kwargs):
# add a Timer to ensure that timeout occurs.
if not self._cb_timer.is_alive():
self._cb_timer.start()

nonlocal initial_timestamp
if abs(value - set_value) < tolerance:
Expand All @@ -93,7 +91,7 @@ def status_indicator(value, timestamp, **kwargs):
# hand the status object back to the RE
return status

def stop(self):
def stop(self, success=False):
# overide the lock, cancel the timer and remove the subscription on any
# in progress sets
self._set_lock.release()
Expand Down