do not close pilatus curtain after measurements
All checks were successful
CI for debye_bec / test (push) Successful in 1m0s

This commit is contained in:
x01da
2025-12-02 07:31:24 +01:00
parent b696023547
commit 00b7aa3fbb

View File

@@ -71,18 +71,17 @@ class PilatusCurtain(PSIDeviceBase):
def on_unstage(self) -> DeviceStatus | None:
"""Called while unstaging the device."""
return self.close()
# return self.close()
def on_stop(self) -> DeviceStatus | None:
"""Called when the device is stopped."""
return self.close()
# return self.close()
def open(self) -> DeviceStatus | None:
"""Open the cover"""
if self.cover_is_closed.get() == COVER.CLOSED:
self.open_cover.put(1)
# TODO timeout ok?
status_open = CompareStatus(self.cover_is_open, COVER.OPEN, timeout=5)
status_open = CompareStatus(self.cover_is_open, COVER.OPEN, timeout=8)
status_error = CompareStatus(self.cover_error, COVER.ERROR, operation="!=")
status = AndStatusWithList(device=self, status_list=[status_open, status_error])
return status
@@ -93,8 +92,7 @@ class PilatusCurtain(PSIDeviceBase):
"""Close the cover"""
if self.cover_is_open.get() == COVER.OPEN:
self.close_cover.put(1)
# TODO timeout ok?
status_close = CompareStatus(self.cover_is_closed, COVER.CLOSED, timeout=5)
status_close = CompareStatus(self.cover_is_closed, COVER.CLOSED, timeout=8)
status_error = CompareStatus(self.cover_error, COVER.ERROR, operation="!=")
status = AndStatusWithList(device=self, status_list=[status_close, status_error])
return status