diff --git a/nslsii/temperature_controllers.py b/nslsii/temperature_controllers.py index fd0a4264..85482554 100644 --- a/nslsii/temperature_controllers.py +++ b/nslsii/temperature_controllers.py @@ -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: @@ -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() diff --git a/requirements.txt b/requirements.txt index 17f26884..19001688 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ databroker ipython ipywidgets matplotlib +netifaces numpy ophyd psutil