perf(std_daq): only reset backend if status is not idle
This commit is contained in:
@@ -367,10 +367,13 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase):
|
||||
"""Stop the camera acquisition and set it to idle state"""
|
||||
self.set_idle().wait()
|
||||
status = DeviceStatus(self)
|
||||
self.backend.add_status_callback(
|
||||
status, success=[StdDaqStatus.IDLE], error=[StdDaqStatus.REJECTED, StdDaqStatus.ERROR]
|
||||
)
|
||||
self.backend.stop()
|
||||
if self.backend.status != StdDaqStatus.IDLE:
|
||||
self.backend.add_status_callback(
|
||||
status, success=[StdDaqStatus.IDLE], error=[StdDaqStatus.REJECTED, StdDaqStatus.ERROR]
|
||||
)
|
||||
self.backend.stop()
|
||||
else:
|
||||
status.set_finished()
|
||||
return status
|
||||
|
||||
@property
|
||||
@@ -526,6 +529,7 @@ class PcoEdge5M(PSIDeviceBase, PcoEdgeBase):
|
||||
successful=True,
|
||||
hinted_location={"data": "data"},
|
||||
)
|
||||
logger.info(f"Finished writing to {self.target_file}")
|
||||
|
||||
status = self.acq_done()
|
||||
status.add_callback(_create_dataset)
|
||||
|
||||
Reference in New Issue
Block a user